Clustericious::Log - A Log::Log4perl wrapper for use with Clustericious.
version 1.29
use Clustericious::Log -init_logging => "appname"; use Clustericious::Log; INFO "Hi there!";
This is a simple wrapper around Log::Log4perl for use with Clustericious. It handles initialization and exporting of convenient logging functions, and a default set of logging patterns. It also makes the name of the application available for logging patterns (see the example).
Here is a sample ~/etc/log4perl.conf :
~/etc/log4perl.conf
log4perl.rootLogger=TRACE, LOGFILE log4perl.appender.LOGFILE=Log::Log4perl::Appender::File log4perl.appender.LOGFILE.filename=/tmp/some.log log4perl.appender.LOGFILE.mode=append log4perl.appender.LOGFILE.layout=PatternLayout log4perl.appender.LOGFILE.layout.ConversionPattern=[%d{HH:mm:ss}] [%8.8Z] %C (%F{1}+%L) %5p: %m%n # Note 'Z' is the name of the Clustericious application.
Start logging. Looks for log4perl.conf or $app.log4perl.conf in ~/etc and /etc.
log4perl.conf
$app.log4perl.conf
~/etc
/etc
Returns a string with the last $n lines of the logfile.
If multiple log files are defined, it only uses the first one alphabetically.
The following variables affect logging :
LOG_LEVEL LOG_FILE MOJO_APP
Log::Log4perl, Clustericious
Original author: Brian Duggan
Current maintainer: Graham Ollis <plicease@cpan.org>
Contributors:
Curt Tilmes
Yanick Champoux
This software is copyright (c) 2013 by NASA GSFC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Clustericious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clustericious
CPAN shell
perl -MCPAN -e shell install Clustericious
For more information on module installation, please visit the detailed CPAN module installation guide.