- SEE ALSO
- COPYRIGHT AND LICENSE
Log::Dispatch::FileWriteRotate - Log to files that archive/rotate themselves, w/ File::Write::Rotate
use Log::Dispatch::FileWriteRotate; my $file = Log::Dispatch::FileWriteRotate( min_level => 'info', # will be passed to File::Write::Rotate dir => '/var/log', prefix => 'myapp', suffix => '.log', period => 'monthly', size => 25*1024*1024, histories => 12, ); $file->log(level => 'info', message => "Your comment\n");
This module functions similarly to Log::Dispatch::FileRotate, but uses File::Write::Rotate as backend, thus interoperates more easily with other modules which use File::Write::Rotate as backend, e.g. Tie::Handle::FileWriteRotate or Process::Govern.
None are exported by default, but they are exportable.
Constructor. This method takes a hash of parameters. The following options are valid:
max_level (see Log::Dispatch documentation);
histories (see File::Write::Rotate).
log_message(message => STR)
Send a message to the appropriate output. Generally this shouldn't be called directly but should be called through the
log() method (in LLog::Dispatch::Output>).
Please visit the project's homepage at https://metacpan.org/release/Log-Dispatch-FileWriteRotate.
Source repository is at https://github.com/sharyanto/perl-Log-Dispatch-FileWriteRotate.
Please report any bugs or feature requests on the bugtracker website "/rt.cpan.org/Public/Dist/Display.html?Name=Log-Dispatch-FileWriteR otate" in https:
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Steven Haryanto <firstname.lastname@example.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Steven Haryanto.