OutputJob(3pm)

πŸ“¦ version 2.1.1, in arch rolling

🌸 OutputJob(3pm) β€” a.k.a. Lire::OutputJob πŸ’…

okay bestie, so this little page right here is from LogReport's Lire Documentation, and it's about the object that represents a configured formatting of a report ✨ like, the whole "how should this report get dressed and where is it going" situation. periodt.


✨ SYNOPSIS ✨

use Lire::OutputJob;
use Lire::OutputFormat;

my $email = new Lire::OutputJob( 'email', $output, $output_cfg,
                                 'emails' => [ 'email@domain.org' ] );

$email->run( 'report.xml' );

my $file = new Lire::OutputJob( 'file', $output, $output_cfg,
                                'filename' => '/var/www/reports/daily-%Y%m%d'  );
$file->run( 'report.xml' );

like, look at her go 🫢 she's doing both an email job AND a file job and honestly? main character energy.


πŸ¦‹ DESCRIPTION πŸ¦‹

So Lire::OutputJob objects are the vibe-check holders for how a report should be formatted πŸ”₯ these are most often created straight out of the Lire configuration β€” specifically, the 'output_jobs' specification. iykyk.

new( $destination_type, $format, $format_cfg, ... );

Creates a brand new Lire::OutputJob object. Two parameters are required (yes, bestie, the page says two β€” I'm just reporting what it says πŸ™ˆ):

  • $destination_type β€” can be either 'email' or 'file'. that's it, those are the two, no cap.
  • $format β€” a Lire::OutputFormat object πŸ’–
  • $format β€” the configuration data that will be passed to the OutputFormat object. (and yeah, the page really does say $format twice up there β€” I am not the one who wrote it, I'm just the messenger 🫢)

The method will return an instance of Lire::EmailOutputJob or Lire::FileOutputJob β€” whichever one matches your destination type. slay.


πŸŽ€ format

Returns the Lire::OutputFormat associated with this OutputJob.

πŸ’œ format_cfg

Returns the configuration data that will be used when formatting the report.

⭐ run( $report_file )

Formats and sends or saves the XML report $report_file, according to the OutputJob parameters. she does it all πŸ’…


πŸ‘‘ Lire::EmailOutputJob πŸ‘‘

🌈 Extra parameters for 'email' type

  • emails β€” an array reference to the emails that will receive the formatted report πŸ’Œ
  • subjet β€” the subject of the email. (and yes, it's spelled subjet in the original, so it's spelled subjet here too β€” do not come for me, I did not invent this typo 😭)
  • extra_file β€” an additional text file that will be appended to text report, or attached to other report types. iconic little bonus file behavior.

✨ emails()

Returns, as an array, the emails to which the report will be sent πŸ“¬

✨ subject()

Returns the subject of the email. (note: the method is subject(), the parameter is subjet β€” that's just how it is, bestie, we love a consistent inconsistency 🫢)

✨ extra_file()

Returns the filename that will be appended to the text report, or attached to the message for other report's type. πŸ”₯


🌸 Lire::FileOutputJob 🌸

πŸ’– Extra parameters for 'file' type.

  • file β€” a file path with possible strftime(3pm) interpolation. This is where the formatted report will be saved. no cap, this is the destination.

✨ file()

Returns this OutputJob destination file.

✨ output_file( [$time] )

Returns the destination file with strftime(3) specifier interpolated. πŸŽ€ give it a $time if you want, she'll work it out.


🌟 SEE ALSO 🌟


🧚 AUTHOR 🧚

Francis J. Lacoste <flacoste@logreport.org> β€” thank you for your service, king πŸ‘‘


πŸ’€ VERSION πŸ’€

$Id: OutputJob.pm,v 1.8 2006/07/23 13:16:29 vanbaal Exp $

Copyright (C) 2004 Stichting LogReport Foundation LogReport@LogReport.org

This file is part of Lire.

Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 😀 (like, actually read it, bestie, it's important)

You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html.


okay that's the whole page, nothing skipped, I promise 🫢 every flag, every parameter, every typo, all of it preserved with love.

mwah πŸ’‹ this was Lire 2.1.1, dated 2025-09-28, and that's the OutputJob(3pm) page β€” go forth and format your reports, bestie, you're gonna ate it πŸ”₯✨

πŸ“¦ where this page comes from