Log::Any::Adapter::FileHandle(3pm) | User Contributed Perl Documentation | Log::Any::Adapter::FileHandle(3pm) |
Log::Any::Adapter::FileHandle - A basic Log::Any::Adapter to forward messages to a filehandle
version 0.010
use Log::Any qw($log); use Log::Any::Adapter; # Send all logs to Log::Any::Adapter::FileHandle Log::Any::Adapter->set('FileHandle'); $log->info("Hello world");
This module is a basic adapter that will simply forward log messages to a filehandle, or any object that supports a 'print' method (IO::String, IO::Socket::INET, Plack's $env->{psgi.errors} object, etc).
I've created it so that my scripts running under damontools or runit can output messages to locally defined logs. It does not timestamp messages, that responsbility is delegated to the external log capture mechanism.
You can override the default configuration by passing extra arguments to the "Log::Any" set_adapter method:
Copyright 2014 by Jason Jay Rodrigues <jasonjayr+oss@gmail.com>
Log::Any::Adapter::FileHandle is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2022-11-19 | perl v5.36.0 |