HTTPD::Log::Filter

HTTPD::Log::Filter is a Perl module to filter entries out of an httpd log.
Download

HTTPD::Log::Filter Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ave Wrigley
  • Publisher web site:
  • http://search.cpan.org/~awrigley/

HTTPD::Log::Filter Tags


HTTPD::Log::Filter Description

HTTPD::Log::Filter is a Perl module to filter entries out of an httpd log. HTTPD::Log::Filter is a Perl module to filter entries out of an httpd log.SYNOPSIS my $hlf = HTTPD::Log::Filter->new( exclusions_file => $exclusions_file, agent_re => '.*Mozilla.*', format => 'ELF', ); while( ) { my $ret = $hlf->filter( $_ ); die "Error at line $.: invalid log formatn" unless defined $ret; print $_ if $ret; } print grep { $hlf->filter( $_ ) } ; $hlf = HTTPD::Log::Filter->new( capture => ; ); while( ) { next unless $hlf->filter( $_ ); print $hlf->host, "n"; } print grep { $hlf->filter( $_ ) } ;This module provide a simple interface to filter entries out of an httpd logfile. The constructor can be passed regular expressions to match against particular fields on the logfile. It does its filtering line by line, using a filter method that takes a line of a logfile as input, and returns true if it matches, and false if it doesn't.There are two possible non-matching (false) conditions; one is where the line is a valid httpd logfile entry, but just doesn't happen to match the filter (where "" is returned). The other is where it is an invalid entry according to the format specified in the constructor. Requirements: · Perl


HTTPD::Log::Filter Related Software