Apache-Logmonster
view release on metacpan or search on metacpan
Apache
Adjust the CustomLog and ErrorLog definitions. We make two
changes, appending %v (the vhost name) to the CustomLog and
adding cronolog to automatically rotate the log files.
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %v" combined
CustomLog "| /usr/local/sbin/cronolog /var/log/apache/%Y/%m/%d/access.log" combined
ErrorLog "| /usr/local/sbin/cronolog /var/log/apache/%Y/%m/%d/error.log"
Lighttpd
accesslog.format = "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %v"
accesslog.filename = "|/usr/local/sbin/cronolog /var/log/http/%Y/%m/%d/access.log"
server.errorlog = "/var/log/http/error.log"
Step 4 - Test manually, then add to cron.
crontab -u root -e
5 1 * * * /usr/local/sbin/logmonster -i day
Step 5 - Read the FAQ
<http://tnpi.net/wiki/Logmonster_FAQ>
Step 6 - Enjoy
bin/logmonster.pl view on Meta::CPAN
=item Apache
Adjust the CustomLog and ErrorLog definitions. We make two changes, appending %v (the vhost name) to the CustomLog and adding cronolog to automatically rotate the log files.
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %v" combined
CustomLog "| /usr/local/sbin/cronolog /var/log/apache/%Y/%m/%d/access.log" combined
ErrorLog "| /usr/local/sbin/cronolog /var/log/apache/%Y/%m/%d/error.log"
=item Lighttpd
accesslog.format = "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %v"
accesslog.filename = "|/usr/local/sbin/cronolog /var/log/http/%Y/%m/%d/access.log"
server.errorlog = "/var/log/http/error.log"
=back
=item Step 4 - Test manually, then add to cron.
crontab -u root -e
5 1 * * * /usr/local/sbin/logmonster -i day
=item Step 5 - Read the FAQ
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
debug - to print status and verbose error messages, set debug=>1.
fatal - die on errors. This is the default, set fatal=>0 to override.
=head1 DEPENDENCIES
Perl.
Scalar::Util - built-in as of perl 5.8
Almost nothing else. A few of the methods do require certian things, like extract_archive requires tar and file. But in general, this package (Apache::Logmonster::Utility) should run flawlessly on any UNIX-like system. Because I recycle this package ...
=head1 METHODS
=over
=item new
To use any of the methods below, you must first create a utility object. The methods can be accessed via the utility object.
( run in 2.402 seconds using v1.01-cache-2.11-cpan-acf6aa7dc9e )