Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

log::log4perl::appender::screencoloredlevels(3pm) [debian man page]

Appender::ScreenColoredLevels(3pm)			User Contributed Perl Documentation			Appender::ScreenColoredLevels(3pm)

NAME
Log::Log4perl::Appender::ScreenColoredLevel - 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"; DESCRIPTION
This 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. COPYRIGHT AND LICENSE
Copyright 2002-2009 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. perl v5.10.1 2010-07-21 Appender::ScreenColoredLevels(3pm)

Check Out this Related Man Page

Appender::RRDs(3pm)					User Contributed Perl Documentation				       Appender::RRDs(3pm)

NAME
Log::Log4perl::Appender::RRDs - Log to a RRDtool Archive SYNOPSIS
use Log::Log4perl qw(get_logger); use RRDs; my $DB = "myrrddb.dat"; RRDs::create( $DB, "--step=1", "DS:myvalue:GAUGE:2:U:U", "RRA:MAX:0.5:1:120"); print time(), " "; Log::Log4perl->init(qq{ log4perl.category = INFO, RRDapp log4perl.appender.RRDapp = Log::Log4perl::Appender::RRDs log4perl.appender.RRDapp.dbname = $DB log4perl.appender.RRDapp.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.RRDapp.layout.ConversionPattern = N:%m }); my $logger = get_logger(); for(10, 15, 20, 25) { $logger->info($_); sleep 1; } DESCRIPTION
"Log::Log4perl::Appender::RRDs" appenders facilitate writing data to RRDtool round-robin archives via Log4perl. For documentation on RRD and its Perl interface "RRDs" (which comes with the distribution), check out <http://rrdtool.org>. Messages sent to Log4perl's RRDs appender are expected to be numerical values (ints or floats), which then are used to run a "rrdtool update" command on an existing round-robin database. The name of this database needs to be set in the appender's "dbname" configuration parameter. If there's more parameters you wish to pass to the "update" method, use the "rrdupd_params" configuration parameter: log4perl.appender.RRDapp.rrdupd_params = --template=in:out To read out the round robin database later on, use "rrdtool fetch" or "rrdtool graph" for graphic displays. COPYRIGHT AND LICENSE
Copyright 2002-2009 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. perl v5.10.1 2010-07-21 Appender::RRDs(3pm)
Man Page