NAME

File::Stamped - time stamped log file

SYNOPSIS

use File::Stamped;
my $fh = File::Stamped->new(pattern => '/var/log/myapp.log.%Y%m%d.txt');
$fh->print("OK\n");

# with Log::Minimal
use Log::Minimal;
my $fh = File::Stamped->new(pattern => '/var/log/myapp.log.%Y%m%d.txt');
local $Log::Minimal::PRINT = sub {
    my ( $time, $type, $message, $trace) = @_;
    print {$fh} "$time [$type] $message at $trace\n";
};

DESCRIPTION

File::Stamped is utility library for logging. File::Stamped object mimic file handle.

You can use "myapp.log.%Y%m%d.log" style log file.

METHODS

AUTHOR

Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ gmail.com>

SEE ALSO

Log::Dispatch::File::Stamped

LICENSE

Copyright (C) Tokuhiro Matsuno

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