The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Regexp::Log::WMS - A regular expression parser for WMS log format.

SYNOPSIS

    my $foo = Regexp::Log::Common->new(
        format  => 'custom %date %cs_uri_stem',
        capture => [qw( date request )],
    );

    # the format() and capture() methods can be used to set or get
    $foo->format('custom %date %cs_uri_stem %c_rate %c_status');
    $foo->capture(qw( date cs_uri_stem ));

    # 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::WMS 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 by WMS.

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

ABSTRACT

Regexp::Log::WMS enables simple parsing of log files created by WMS.

LOG FORMAT

WMS Log Format

    my $foo = Regexp::Log::WMS->new( format  => ':common' );

The WMS Log Format is made up of several fields, each delimited by a single space.

  • Fields:

      c_ip date c_dns cs_uri_stem c_starttime x_duration c_rate c_status
      c_playerid c_playerversion c_playerlanguage cs_user_agent cs_referer
      c_hostexe c_hostexever c_os c_osversion c_cpu filelength filesize
      avgbandwidth protocol transport audiocodec videocodec channelURL
      sc_bytes c_bytes s_pkts_sent c_pkts_received c_pkts_lost_client
      c_pkts_lost_net c_pkts_lost_cont_net c_resendreqs
      c_pkts_recovered_ECC c_pkts_recovered_resent c_buffercount
      c_totalbuffertime c_quality s_ip s_dns s_totalclients s_cpu_util

BUGS, PATCHES & FIXES

This is a very early release of this module, so maybe you will find some bugs there, report them to me (including a patch if possible) and I will try to correct it as soon as possible.

The regular expresions generated are not specially efficient.

SEE ALSO

Regexp::Log, Regexp::Log::Common, Regexp::Log::RealServer

AUTHOR

Salvador Fandiño <sfandino@yahoo.com>.

Based on Regexp::Log::Common by Barbie <barbie@cpan.org>

COPYRIGHT AND LICENSE

Copyrigth (c) 2005 by Salvador Fandiño. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.