Log::Log4perl::Appender::ScreenColoredLevels::UsingMyColors - Colorize messages according to level amd my colors
use Log::Log4perl::Appender::ScreenColoredLevels::UsingMyColors;
use Log::Log4perl qw(:easy); Log::Log4perl->init(\ <<'EOT'); log4perl.category = DEBUG, Screen log4perl.appender.Screen = Log::Log4perl::Appender::ScreenColoredLevels::UsingMyColors log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Screen.layout.ConversionPattern = [%p] %d %F{1} %L> %m %n log4perl.appender.Screen.color.trace = cyan log4perl.appender.Screen.color.debug = default log4perl.appender.Screen.color.info = green log4perl.appender.Screen.color.warn = default log4perl.appender.Screen.color.error = default log4perl.appender.Screen.color.fatal = red EOT
This appender acts like Log::Log4perl::Appender::ScreenColoredLevels, but you get to choose the colors. You can choose any of the constants from Term::ANSIColor.
Log::Log4perl::Appender::ScreenColoredLevels, Term::ANSIColor
This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.
http://sourceforge.net/projects/brian-d-foy/
If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.
brian d foy, <bdfoy@cpan.org>
<bdfoy@cpan.org>
Copyright (c) 2008, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.
To install Log::Log4perl::Appender::ScreenColoredLevels::UsingMyColors, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Log4perl::Appender::ScreenColoredLevels::UsingMyColors
CPAN shell
perl -MCPAN -e shell install Log::Log4perl::Appender::ScreenColoredLevels::UsingMyColors
For more information on module installation, please visit the detailed CPAN module installation guide.