Log::Dispatch::File - Object that accepts messages and does nothing
use Log::Dispatch::Null; my $null = Log::Dispatch::Null->new( name => 'null', min_level => 'info' ); $null->log( level => 'emerg', message => "I've fallen and I can't get up\n" );
This class provides a null logging object. Messages can be sent to the object but it does nothing with them.
This method takes a hash of parameters. The following options are valid:
This parameter may be a single subroutine reference or an array reference of subroutine references. These callbacks will be called in the order they are given and passed a hash containing the following keys:
( message => $log_message, level => $log_level )
The callbacks are expected to modify the message and then return a
single scalar containing that modified message. These callbacks will
be called when either the log
or log_to
methods are called and
will only be applied to a given message once.
log()
method
(in Log::Dispatch::Output).
Dave Rolsky, <autarch@urth.org>