The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Bro::Log::Parse - Object-oriented Perl interface for parsing Bro log files

SYNOPSIS

use Bro::Log::Parse;

my $parse = Bro::Log::Parse->new('/path/to/logfile');
while ( $fields = $parse->getLine() ) {
  print $fields->{ts}."\n";
}

ABSTRACT

Perl inerface for parsing Bro logfiles

DESCRIPTION

This library provides an easy and convenient way to parse the log files generated by the Bro Network Monitoring System.

FUNCTIONS

new(constructor)

The base constructor for Bro::Log::Parse classes. It takes a mandatory parameter containing the path to the logfile as an adrument and returns the new object. If no file is specified, input will be read from <>.

If the file pointed to does not exist or cannot be opened, a fatal error is raised.

getLine()

Read the the line of the input and return the parsed data as a hash. Returns undef when on EOF.

AUTHOR Johanna Amann, <johanna@icir.org>

COPYRIGHT AND LICENSE Copyright 2014 by Johanna Amann This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.