Log::Parallel::Parsers - Log::Parallel::Parsers documentation


Log-Parallel documentation  | view source Contained in the Log-Parallel distribution.

Index


SYNOPSIS

Top

 my $pfunc = get_parser('JSON', $filehandle, %opts);

 while ($log = &$pfunc()) {
 }

DESCRIPTION

Top

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.

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.

%opts keys for intermediate files

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.

%opts keys for raw inputs

When opening a raw input file, the following %opts keys will be defined:

time

A time_t representing the start time for the file.

span

The length of time (in seconds) the file is supposed to cover. (Not adjusted for daylight savings time.)

SEE ALSO

Top

Log::Parallel::TSV

LICENSE

Top

This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.


Log-Parallel documentation  | view source Contained in the Log-Parallel distribution.