NAME

Log::Handler::Output::File::Stamper - Log messages to a file(with stamp in the filename).

SYNOPSIS

    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

DESCRIPTION

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.

This module differs only on the following points:

fork()-safe

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).

multitasking-safe

This module uses flock() to lock the file while writing to it. Then also filelock option was removed(means always set 1:enabled).

stamped filenames

This module supports a special tag in the filename that will expand to the current date/time/pid. See also Log::Stamper

METHODS

new()

Call new() to create a new Log::Handler::Output::File::Stamper object.

log()

Call log() if you want to log messages to the log file(with stamp).

You can check other methods in Log::Handler::Output::File document.

REPOSITORY

Log::Handler::Output::File::Stamper is hosted on github <http://github.com/bayashi/Log-Handler-Output-File-Stamper>

AUTHOR

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

SEE ALSO

Log::Handler, Log::Handler::Output::File

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.