Log::Dispatch::Colorful - Object for logging to screen.
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 );
Log::Dispatch::Colorful is provides an object for logging to the screen.
this module is rewrite Log::Dispatch method for Dumper. if you don't need Dumper, you think about using Log::Dispatch::Screen::Color.
This method takes a hash of parameters.
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).
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).
log()
Daisuke Komatsu <vkg.taro@gmail.com>
Log::Dispatch, Log::Dispatch::Screen, Catalyst::Plugin::Log::Colorful
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Log::Dispatch::Colorful, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Dispatch::Colorful
CPAN shell
perl -MCPAN -e shell install Log::Dispatch::Colorful
For more information on module installation, please visit the detailed CPAN module installation guide.