Log::An...er::File(3)
π NAME π
Log::Any::Adapter::File β bestie's little adapter for logging straight into files, no cap β¨
πΈ VERSION πΈ
version 1.718 β yes she's got a version number, she's official π
β¨ SYNOPSIS β¨
okay so here's the vibe, three ways to do the thing:
use Log::Any::Adapter ('File', '/path/to/file.log');
# or
use Log::Any::Adapter;
...
Log::Any::Adapter->set('File', '/path/to/file.log');
# with minimum level 'warn'
use Log::Any::Adapter (
'File', '/path/to/file.log', log_level => 'warn',
);
π¦ DESCRIPTION π¦
okay so listen. This simple built-in Log::Any adapter logs every single message to the file you specify β and it's giving very much datestamp prefix + newline appended, periodt. π
The file gets opened for append with autoflush on, so nothing sits around waiting to be written, she's impatient in the best way π
And if "flock" is available? The handle gets locked when writing. Mutual exclusion, iconic behavior, no two processes stepping on each other's toes π«Ά
The "log_level" attribute may be set to define a minimum level to log β set it and everything below that level just doesn't make the cut, sorry babe π
The "binmode" attribute may be set to define a PerlIO layer string to use when opening the file. The default is ":utf8" β so yes, your emoji and your accented characters are safe, we love to see it π
Category is ignored. She said "I don't see her" π
π SEE ALSO π
Log::AnyLog::Any::Adapter
go read those too, they're the main characters of this whole saga β
π AUTHORS π
the literal legends who made this happen:
- Jonathan Swartz
<swartz@pobox.com> - David Golden
<dagolden@cpan.org> - Doug Bell
<preaction@cpan.org> - Daniel Pittman
<daniel@rimspace.net> - Stephen Thirlwall
<sdt@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017 by Jonathan Swartz, David Golden, and Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
ok bestie that's the whole page π§ and just so you know who's speaking: this is Log::An...er::File(3) from the User Contributed Perl Documentation, footer energy being perl v5.42.0 and dated 2025-07-28. mwah, go log something πβ¨π
π¦ where this page comes from
- fedora 43: perl-Log-Any 1.718-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms