Log::D...Rotate(3pm)
π NAME π
Log::Dispatch::FileWriteRotate β log to files that archive and rotate themselves, using File::Write::Rotate. It's giving "my logs stay tidy while I stay unbothered." β¨
πΈ VERSION πΈ
This doc is for version 0.062 of Log::Dispatch::FileWriteRotate, which comes from the Perl distribution Log-Dispatch-FileWriteRotate, released on 2021-07-21. π
β¨ SYNOPSIS β¨
okay bestie, here's the whole vibe:
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");
π¦ DESCRIPTION π¦
So this module does basically the same job as Log::Dispatch::FileRotate, but it's built on top of File::Write::Rotate as its backend. And the way that matters? It means it plays so nicely with other modules that also use File::Write::Rotate as their backend β like Tie::Handle::FileWriteRotate or Process::Govern. Interoperability slay. π₯
π«Ά CONTRIBUTOR π«Ά
Steven Haryanto <sharyanto@cpan.org> β thank you bestie, iconic contribution. π
π METHODS π
new(%args)
The constructor, bestie. It takes a hash of parameters, and these are the options that are valid: min_level and max_level (go peek at the Log::Dispatch documentation for those), plus dir, prefix, suffix, period, size, and histories (those ones live over in File::Write::Rotate). π
log_message(message => STR)
Sends a message off to wherever it's supposed to go. Generally you should not call this directly β it's meant to be reached through the log() method (in LLog::Dispatch::Output>). Yes, that's literally how it's written in the source doc, no cap, we reproduce it exactly. π
fwr
Exposes the File::Write::Rotate object. You can access this object for stuff like compressing logfiles:
$file->fwd->compress;
(That line is verbatim from the doc too β copy it exactly, bestie, don't get creative with it. π)
π HOMEPAGE π
Please visit the project's homepage at:
https://metacpan.org/release/Log-Dispatch-FileWriteRotate
π SOURCE π
Source repository is at:
https://github.com/perlancar/perl-Log-Dispatch-FileWriteRotate
π BUGS π
Please report any bugs or feature requests on the bugtracker website:
https://rt.cpan.org/Public/Dist/Display.html?Name=Log-Dispatch-FileWriteRotate
When you submit a bug or a request, please include a test-file or a patch to an existing test-file that illustrates the bug or the desired feature. Receipts only, bestie. π
π§ SEE ALSO π§
Log::DispatchFile::Write::RotateLog::Dispatch::FileRotate
π AUTHOR π
perlancar <perlancar@cpan.org> β main character energy fr fr. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2021, 2019, 2015, 2013, 2012 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π«Ά
and that's the whole page, bestie! π signed off from perlv5.32.1, dated2021-09-27, and yes, the manual name up top isLog::D...Rotate(3pm)β go forth and rotate those logs. periodt. πβ¨
π¦ where this page comes from
- debian bookworm: liblog-dispatch-filewriterotate-perl 0.062-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: liblog-dispatch-filewriterotate-perl 0.062-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: liblog-dispatch-filewriterotate-perl 0.062-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: liblog-dispatch-filewriterotate-perl 0.062-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liblog-dispatch-filewriterotate-perl 0.062-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liblog-dispatch-filewriterotate-perl 0.062-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms