The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

File::RotateLogs - File logger supports log rotation

SYNOPSIS

use File::RotateLogs;
use Plack::Builder;

my $rotatelogs = File::RotateLogs->new(
    logfile => '/path/to/access_log.%Y%m%d%H%M',
    linkname => '/path/to/access_log',
    rotationtime => 3600,
    maxage => 86400, #1day
);

builder {
    enable 'AccessLog',
      logger => sub { $rotatelogs->print(@_) };
    $app;
};

DESCRIPTION

File::RotateLogs is utility for file logger. Supports logfile rotation and makes symlink to newest logfile.

CONFIGURATION

AUTHOR

Masahiro Nagano

SEE ALSO

File::Stamped, Log::Dispatch::Dir

LICENSE

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