Matt Simerson > Apache-Logmonster > Regexp::Log::Monster

Download:
Apache-Logmonster-5.36.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 5.36   Source  

NAME ^

Regexp::Log::Monster - A regexp parser for the Extended Log Format + vhost

SYNOPSIS ^

    my $foo = Regexp::Log::Monster->new(
        format  => ':logmonster';
        capture => [qw( ts request )],
    );

    # the format() and capture() methods can be used to set or get
    $foo->format('custom %date %request %status %bytes');
    $foo->capture(qw( ts req ));

    # this is necessary to know in which order
    # we will receive the captured fields from the regexp
    my @fields = $foo->capture;

    # the all-powerful capturing regexp :-)
    my $re = $foo->regexp;

    while (<>) {
        my %data;
        @data{@fields} = /$re/;    # no need for /o, it's a compiled regexp

        # now munge the fields
        ...
    }

DESCRIPTION ^

Regexp::Log::Monster uses Regexp::Log as a base class, to generate regular expressions for performing the usual data munging tasks on log files that cannot be simply split().

This specific module enables the computation of regular expressions for parsing the log files created using the Monster Log Format. An example of this format are the logs generated by the httpd web server using the keyword 'common'.

The module also allows for the use of the Extended Monster Log Format.

For more information on how to use this module, please see Regexp::Log.

ABSTRACT ^

Regexp::Log::Monster enables simple parsing of log files created using the Extended Log Format, such as the logs generated by the httpd web server using the keyword 'common'.

SEE ALSO ^

  Regexp::Log
syntax highlighting: