Graham Ollis > Clustericious-Log-0.15 > Clustericious::Log

Download:
Clustericious-Log-0.15.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.15   Source  

NAME ^

Clustericious::Log - A Log::Log4perl wrapper for use with Clustericious.

VERSION ^

version 0.15

SYNOPSIS ^

 use Clustericious::Log -init_logging => "appname";

 use Clustericious::Log;
 INFO "Hi there!";

DESCRIPTION ^

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).

EXAMPLE ^

Here is a sample ~/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.

METHODS ^

init_logging

Start logging. Looks for log4perl.conf or $app.log4perl.conf in ~/etc, /util/etc and /etc.

tail

Returns a string with the last $n lines of the logfile.

If multiple log files are defined, it only uses the first one alphabetically.

ENVIRONMENT ^

The following variables affect logging :

 LOG_LEVEL
 LOG_FILE
 MOJO_APP

NOTES ^

This is a beta release, the API may change without notice.

SEE ALSO ^

Log::Log4perl, Clustericious

AUTHOR ^

original author: Brian Duggan

current maintainer: Graham Ollis <plicease@cpan.org>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: