logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Log::Any::Adapter::File - Simple adapter for logging to files

Authors

• 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>

Description

This simple built-in Log::Any adapter logs each message to the specified file, with a datestamp prefix and newline appended. The file is opened for append with autoflush on. If "flock" is available, the handle will be locked when writing. The "log_level" attribute may be set to define a minimum level to log. The "binmode" attribute may be set to define a PerlIO layer string to use when opening the file. The default is ":utf8". Category is ignored.

Name

Log::Any::Adapter::File - Simple adapter for logging to files

See Also

Log::Any, Log::Any::Adapter

Synopsis

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', );

Version

version 1.717

See Also