OutputJob(3pm)
πΈ 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β aLire::OutputFormatobject π$formatβ the configuration data that will be passed to theOutputFormatobject. (and yeah, the page really does say$formattwice 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 spelledsubjetin the original, so it's spelledsubjethere 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 possiblestrftime(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 π
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
- arch rolling: lire 2.1.1-8 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms