Log::Handler::Output::File::Stamper - Log messages to a file(with stamp in the filename).
use Log::Handler::Output::File::Stamper; my $log = Log::Handler::Output::File::Stamper->new( filename => "foo%d{yyyyMMdd}.log", ); $log->log(message => 'log message'); # => foo20130113.log
This module is subclasses Log::Handler::Output::File for logging to date/time/pid stamped files. See Log::Handler::Output::File for instructions on usage.
Log::Handler::Output::File
This module differs only on the following points:
This module will close and re-open the logfile after a fork. Instead, there are no modes to open a log file. It is append mode only. And reopen option was removed(It is always set 1:enabled).
mode
append
reopen
This module uses flock() to lock the file while writing to it. Then also filelock option was removed(means always set 1:enabled).
filelock
This module supports a special tag in the filename that will expand to the current date/time/pid. See also Log::Stamper
Call new() to create a new Log::Handler::Output::File::Stamper object.
new()
Call log() if you want to log messages to the log file(with stamp).
log()
You can check other methods in Log::Handler::Output::File document.
Log::Handler::Output::File::Stamper is hosted on github <http://github.com/bayashi/Log-Handler-Output-File-Stamper>
Dai Okabayashi <bayashi@cpan.org>
Source codes of this module were borrowed from below modules, very very thanks.
Log::Dispatch::File::Rolling, Log::Dispatch::File::Stamped
Log::Handler, Log::Handler::Output::File
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install Log::Handler::Output::File::Stamper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Handler::Output::File::Stamper
CPAN shell
perl -MCPAN -e shell install Log::Handler::Output::File::Stamper
For more information on module installation, please visit the detailed CPAN module installation guide.