my $pfunc = get_parser('JSON', $filehandle, %opts); while ($log = &$pfunc()) { }
Each format that we may want to read is specified in the logging configuration file by a format name. Log::Parallel::Parsers is the API used to turn one of those names into a perl code to parse the input.
The output from the parser is an anonymous hash, $log.
$log
Parsers are used to read both raw inputs to the logging system and files produced by Log::Parallel::Writers as intermediate steps in the processing of logs.
When processing raw inputs, the output is expected to include a time column and be in time order.
time
%opts
When opening an intermediate file created by Log::Parallel::Writers, the following %opts keys will be defined:
header
A header record as returned by Log::Parallel::Writers.
When opening a raw input file, the following %opts keys will be defined:
A time_t representing the start time for the file.
time_t
span
The length of time (in seconds) the file is supposed to cover. (Not adjusted for daylight savings time.)
Log::Parallel::TSV
This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.
To install Log::Parallel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Parallel
CPAN shell
perl -MCPAN -e shell install Log::Parallel
For more information on module installation, please visit the detailed CPAN module installation guide.