1Appender::ScreenColoredULseevrelCso(n3t)ributed Perl DocAupmpeenntdaetri:o:nScreenColoredLevels(3)
2
3
4

NAME

6       Log::Log4perl::Appender::ScreenColoredLevel - Colorize messages accord‐
7       ing to level
8

SYNOPSIS

10           use Log::Log4perl qw(:easy);
11
12           Log::Log4perl->init(\ <<'EOT');
13             log4perl.category = DEBUG, Screen
14             log4perl.appender.Screen = \
15                 Log::Log4perl::Appender::ScreenColoredLevels
16             log4perl.appender.Screen.layout = \
17                 Log::Log4perl::Layout::PatternLayout
18             log4perl.appender.Screen.layout.ConversionPattern = \
19                 %d %F{1} %L> %m %n
20           EOT
21
22             # Appears black
23           DEBUG "Debug Message";
24
25             # Appears green
26           INFO  "Info Message";
27
28             # Appears blue
29           WARN  "Warn Message";
30
31             # Appears magenta
32           ERROR "Error Message";
33
34             # Appears red
35           FATAL "Fatal Message";
36

DESCRIPTION

38       This appender acts like Log::Log4perl::Appender::Screen, except that it
39       colorizes its output, based on the priority of the message sent.
40
41       The color scheme is
42
43       Debug
44           Black
45
46       Info
47           Green
48
49       Warn
50           Blue
51
52       Error
53           Magenta
54
55       Fatal
56           Red
57
58       The constructor "new()" takes an optional parameter "stderr", if set to
59       a true value, the appender will log to STDERR. If "stderr" is set to a
60       false value, it will log to STDOUT. The default setting for "stderr" is
61       1, so messages will be logged to STDERR by default.
62

AUTHOR

64       Mike Schilli <log4perl@perlmeister.com>, 2004
65
66
67
68perl v5.8.8                       2002-07-10  Appender::ScreenColoredLevels(3)
Impressum