
Thorium::Log - Logging support

version 0.510

use Thorium::Log;
my $log = Thorium::Log->new();
$log->warn('Some warning message');

Thorium::Log is a high level wrapper class around Log::Log4perl's functionality. It exists to replace all prints and says. See Thorium::Roles::Logging for adding logging support via $self-log->...> to your object. You are encouraged to subclass and set prefix().

rw, Bool)
Every time a log message is output ($log->$level($message)), additionally outputs a benchmark time line with the time elapsed since the last log message was output. Defaults to '0'.
rw, Int)
Determines (additional) depth for caller inside Log4Perl. Defaults to '1'.
ro, Str)
The category to use for Log::Log4Perl. This is used to set category specific log levels in the configuration. Default is the name of the package in which the Thorium::Log object was created.
rw, Str)
The location of the configuration file to read. You may set the environment variable THORIUM_LOG_CONF_FILE otherwise /etc/thorium/log.conf will be used. An example is provided in this distribution under conf/log.conf. See Log::Log4Perl for details.
rw, Bool)
Allows automatic die()ing for the fatal level. Defaults to '0'.

Warn with one level of a stack trace.
Warn with full stack trace.
Die with one level of a stack trace.
Die with full stack trace.

Adam Flott <adam@npjh.com>

This software is copyright (c) 2011 by Adam Flott <adam@npjh.com>, CIDC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.