Log::Dispatch::FileWriteRotate - Log to files that archive/rotate themselves, w/ File::Write::Rotate
version 0.01
use Log::Dispatch::FileWriteRotate; my $file = Log::Dispatch::FileWriteRotate( min_level => 'info', # will be passed to File::Write::Rotate dir => '/var/log', prefix => 'myapp', suffix => '.log', period => 'monthly', size => 25*1024*1024, histories => 12, ); $file->log(level => 'info', message => "Your comment\n");
This module functions similarly to Log::Dispatch::FileRotate, but uses File::Write::Rotate as backend, thus interoperates more easily with other modules which use File::Write::Rotate as backend, e.g. Tie::Handle::FileWriteRotate or Process::Govern.
Constructor. This method takes a hash of parameters. The following options are valid: min_level and max_level (see Log::Dispatch documentation); dir, prefix, suffix, period, size, and histories (see File::Write::Rotate).
min_level
max_level
dir
prefix
suffix
period
size
histories
Send a message to the appropriate output. Generally this shouldn't be called directly but should be called through the log() method (in LLog::Dispatch::Output>).
log()
Log::Dispatch
File::Write::Rotate
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2012 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Log::Dispatch::FileWriteRotate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Dispatch::FileWriteRotate
CPAN shell
perl -MCPAN -e shell install Log::Dispatch::FileWriteRotate
For more information on module installation, please visit the detailed CPAN module installation guide.