|
NAMELog::Dispatch::Colorful - Object for logging to screen. SYNOPSIS use Log::Dispatch::Colorful;
my $screen = Log::Dispatch::Colorful->new(
name => 'screen',
min_level => 'debug',
stderr => 1,
format => '[%d] [%p] %m at %F line %L%n',
color => {
info => { text => 'green', },
debug => {
text => 'red',
background => 'white',
},
error => {
text => 'yellow',
background => 'red',
},
}
);
$screen->log( level => 'error', message => "look at that rainbow!\n" );
# dump reference variants!
my $data = {
foo => 'bar',
};
$screen->log( level => 'debug', message => $data );
DESCRIPTIONLog::Dispatch::Colorful is provides an object for logging to the screen. ATTENTIONthis module is rewrite Log::Dispatch method for Dumper. if you don't need Dumper, you think about using Log::Dispatch::Screen::Color. METHODSnewThis method takes a hash of parameters. logSends a message if the level is greater than or equal to the object's minimum level. This method applies any message formatting callbacks that the object may have. (in Log::Dispatch::Output). log_messageSends a message to the appropriate output. Generally this shouldn't be called directly but should be called through the log() method (in Log::Dispatch::Output). AUTHORDaisuke Komatsu <vkg.taro@gmail.com> SEE ALSOLog::Dispatch, Log::Dispatch::Screen, Catalyst::Plugin::Log::Colorful LICENSEThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|