NAME
Log::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 );
DESCRIPTION
Log::Dispatch::Colorful is provides an object for logging to the screen.
METHODS
new
This method takes a hash of parameters.
log
Sends 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_message
Sends 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).
AUTHOR
Daisuke Komatsu <vkg.taro@gmail.com>
SEE ALSO
Log::Dispatch, Log::Dispatch::Screen, Catalyst::Plugin::Log::Colorful
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.