NAME

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

VERSION

version 1.29

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

SEE ALSO

Log::Log4perl, Clustericious

AUTHOR

Original author: Brian Duggan

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

Contributors:

Curt Tilmes

Yanick Champoux

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.