ImportJob(3pm)
๐ ImportJob(3pm) โ like, the whole vibe
Okay bestie, so this is a page from LogReport's Lire Documentation โ it's Lire::ImportJob(3pm) and it's literally the object that represents a periodical source of log data. Yes, that's the whole point of it. Let's go ๐ซถ
๐ธ NAME ๐ธ
Lire::ImportJob โ the object we use to represent a periodical source of log data. That's it, that's the job. ๐
โจ SYNOPSIS โจ
use Lire::ImportJob;
my $src = new Lire::ImportJob( "name",
'pattern' => "/var/log/messsages",
'period' => "unique",
'processor' => $name,
);
my $file = $src->file,
(yes, that trailing comma is in the original, do not come for me ๐)
๐ฆ DESCRIPTION ๐ฆ
So the Lire::ImportJob object is used to represent a source of log data. And here's the cute part: ImportJobs can also be instantiated from configuration data โ specifically, the 'import_job' configuration specification. Slay. โจ
๐ซ new( $name, ... );
Creates a brand-new Lire::ImportJob object. As a mandatory parameter, it takes the name of the log source. You literally cannot skip it, bestie.
Additional parameters, in the order they show up:
patternโ the path to the file that contains the log data. This filename can containstrftime(3)patterns that get substituted to obtain the actual name of the file. Super useful for automatic rotation, no cap. ๐ฅperiodโ the periodicity to which this ImportJob should be processed. Defaults to'unique', which means this is a one-shot ImportJob. Other recognized values are'hourly','daily','weekly','monthly'and'yearly'.converterโ the name of the converter that can be used to process the ImportJob. This must be known to theLire::PluginManager. (iykyk)converter_configโ configuration parameter for theDlfConverter.filterโ a shell command that will be used to filter the log file.encodingโ encoding for the log file. If you omit it, the default system encoding is used.
๐ name()
Returns the name of this ImportJob. Simple. Elegant. Iconic.
๐ period( [$new_period] )
With no argument, returns the period of this ImportJob. With a parameter, the ImportJob's period gets set to this new value. Both ways work, pick your fighter. ๐
๐ file( [$time] )
Returns the file to be used. The optional $time parameter (which defaults to now) is used to compute the file name. So if you wanted to find the file to use for yesterday's data, you could pass time - 86400. Math! ๐งฎโจ
๐ pattern( [$new_file] )
Returns the file pattern to use as log data source. This pattern may contain strftime(3) substitutions. If an argument is used, it will change the file to use.
๐ filter( [$new_filter] )
Returns the shell command that will be used as filter. undef or '' means no filter will be used. (So like, no filter, no problem ๐ซถ)
๐ encoding( [$new_encoding] )
Returns the encoding of the log file. undef and '' mean to use the system default encoding.
๐ converter( [$new_name] )
Returns the name of the converter that should be used for this ImportJob.
๐ converter_config( [$new_config] )
Returns a configuration object that should be used by the DlfConverter (through the set_configuration() method). Fancy. ๐
๐ log_fh( [ $time ] )
Returns a file handle that can be used to read from the log. $time is the parameter taken by file to determine the final filename. All filters and encoding will be set up properly for you. We love a method that handles the boring stuff. ๐
๐ run( $store, [$time] )
Runs this ImportJob and imports it into the $store DlfStore. The $time parameter will be used to determine the time window covered by period. It defaults to the current time. Go little ImportJob, go! ๐ฅ
๐ SEE ALSO ๐
๐ AUTHOR ๐
Francis J. Lacoste <flacoste@logreport.org>
โญ VERSION โญ
$Id: ImportJob.pm,v 1.14 2006/07/23 13:16:29 vanbaal Exp $
๐ COPYRIGHT ๐
Copyright (C) 2002-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.
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.
ngl, that's the whole page. Every flag, every default, every method โ nothing skipped, periodt. ๐
And that's a wrap, bestie โ this was Lire 2.1.1, dated 2025-09-28, and yes, it's still ImportJob(3pm) at the end of the day. Catch you in the next manpage! ๐ฆ๐๐
๐ฆ 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