Build Status

NAME

Log::Dispatch::CronoDir - Log dispatcher for logging to time-based directories

SYNOPSIS

use Log::Dispatch::CronoDir;

my $log = Log::Dispatch::CronoDir->new(
    dirname_pattern => '/var/log/%Y/%m/%d',
    permissions     => 0777,
    filename        => 'output.log',
    mode            => '>>:unix',
    binmode         => ':utf8',
    autoflush       => 1,
);

# Write log to file `/var/log/2000/01/01/output.log`
$log->log(level => 'error', message => 'Something has happened');

DESCRIPTION

Log::Dispatch::CronoDir is a file log dispatcher with time-based directory management.

METHODS

new(Hash %args)

Creates an instance. Accepted hash keys are:

log(Hash %args)

Writes log to file.

SEE ALSO

Log::Dispatch

LICENSE

Copyright (C) yowcow.

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

AUTHOR

yowcow yowcow@cpan.org