Appender::ScreenColoredLevels - Online Linux Manual PageSection : 3
Updated : 2022-01-21
Source : perl v5.34.0
Note : User Contributed Perl Documentation
NAMELog::Log4perl::Appender::ScreenColoredLevels − Colorize messages according to level
SYNOPSIS use Log::Log4perl qw(:easy);
Log::Log4perl−>init(\ <<'EOT');
log4perl.category = DEBUG, Screen
log4perl.appender.Screen = \
Log::Log4perl::Appender::ScreenColoredLevels
log4perl.appender.Screen.layout = \
Log::Log4perl::Layout::PatternLayout
log4perl.appender.Screen.layout.ConversionPattern = \
%d %F{1} %L> %m %n
EOT
# Appears black
DEBUG "Debug Message";
# Appears green
INFO "Info Message";
# Appears blue
WARN "Warn Message";
# Appears magenta
ERROR "Error Message";
# Appears red
FATAL "Fatal Message";
DESCRIPTIONThis appender acts like Log::Log4perl::Appender::Screen, except that it colorizes its output, based on the priority of the message sent. You can configure the colors and attributes used for the different levels, by specifying them in your configuration: log4perl.appender.Screen.color.TRACE=cyan
log4perl.appender.Screen.color.DEBUG=bold blue
You can also specify nothing, to indicate that level should not have coloring applied, which means the text will be whatever the default color for your terminal is. This is the default for debug messages. log4perl.appender.Screen.color.DEBUG=
You can use any attribute supported by Term::ANSIColor as a configuration option. log4perl.appender.Screen.color.FATAL=\
bold underline blink red on_white
The commonly used colors and attributes are: attributes BOLD, DARK, UNDERLINE, UNDERSCORE, BLINK colors BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE background colors ON_BLACK, ON_RED, ON_GREEN, ON_YELLOW, ON_BLUE, ON_MAGENTA, ON_CYAN, ON_WHITE See Term::ANSIColor for a complete list, and information on which are supported by various common terminal emulators. The default values for these options are: Trace Yellow Debug None (whatever the terminal default is) Info Green Warn Blue Error Magenta Fatal Red The constructor new() takes an optional parameter stderr, if set to a true value, the appender will log to STDERR. If stderr is set to a false value, it will log to STDOUT. The default setting for stderr is 1, so messages will be logged to STDERR by default. The constructor can also take an optional parameter color, whose value is a hashref of color configuration options, any levels that are not included in the hashref will be set to their default values.
Using ScreenColoredLevels on WindowsNote that if you're using this appender on Windows, you need to fetch Win32::Console::ANSI from CPAN and add use Win32::Console::ANSI;
to your script.
LICENSECopyright 2002−2013 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHORPlease contribute patches to the project on Github: http://github.com/mschilli/log4perl
Send bug reports or requests for enhancements to the authors via our MAILING LIST (questions, bug reports, suggestions/patches): log4perl−devel@lists.sourceforge.net Authors (please contact them via the list above, not directly): Mike Schilli <m@perlmeister.com>, Kevin Goess <cpan@goess.org> Contributors (in alphabetical order): Ateeq Altaf, Cory Bennett, Jens Berthold, Jeremy Bopp, Hutton Davidson, Chris R. Donnelly, Matisse Enzer, Hugh Esco, Anthony Foiani, James FitzGibbon, Carl Franks, Dennis Gregorovic, Andy Grundman, Paul Harrington, Alexander Hartmaier David Hull, Robert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter, Brett Rann, Peter Rabbitson, Erik Selberg, Aaron Straup Cope, Lars Thegler, David Viner, Mac Yang. 0
Johanes Gumabo
Data Size : 12,539 byte
man-Log::Log4perl::Appender::ScreenColoredLevels.3pmBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 184,158
Visitor ID : :
Visitor IP : 13.59.69.58 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|Log::Log4perl::Appender::ScreenColoredLevels.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|Log::Log4perl::Appender::ScreenColoredLevels.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|Log::Log4perl::Appender::ScreenColoredLevels.3pm|43|br══─}─══|'br══─}─══
) (htmlprn|149|Log::Log4perl::Appender::ScreenColoredLevels.3pm|43|'br══─}─══ |'br══─}─══
)