Jeremiah C. Foster


Apache::Yaalr - Perl module for Yet Another Apache Log Reader


    use Apache::Yaalr qw( @potential_confs );

    my $a = Apache::Yaalr->new();

    # get operating system information
    my @os = $a->os();

    # Get information from an apache2 configuration
    my ($file, $format, $str) = $a->apache2_conf("/etc/apache2/apache2.conf");

    $a->os();          - a estimation of the operating system using uname -a if uname exists. 
                         Otherwise this uses $^O. If it cannot find the hostname or oper-                                          
                         ating system, it returns unknown.    

    $a->apache2_conf("/etc/apache2/apache2.conf");     <= This is not yet complete EXPERIMENTAL!

                       - this allows you to pass an apache2 configuration set and find out
                         the format string from the format you are using, as well as the 
                         type of log that has been assigned, (i.e. agent, common, combined, etc.)


The goal of Yaalr (Yet Another Apache Log Reader) is to read Apache access logs and report back. Since the Apache web server can have its access log in different places depending on operating system, Yaalr does its best to find out what type of operating system is being used and then find the configuration files to extract the location of the log files. Along the way a lot of other potentially useful information is gathered which can also be accessed through the above interface.


use Apache::Yaalr qw( @potential_confs );

my $a = Apache::Yaalr->new(); my @os = $a->os();

# break apart the array from $^0 or uname my ($os, $name, $rest) = split / /, $os[0]; print "\n\tLocal hostname: $name\n\tOperating system: $os\n";


More information can be found regarding Yaalr here:

Also Apache(1)


Jeremiah Foster, <>


Copyright (C) 2007 by Jeremiah Foster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.