NAME
XAS::System::Logger - The logging module for the XAS environment
SYNOPSIS
Your program could use this module in the following fashion:
use XAS::System;
$log = XAS::System->module(
logger => {
-filename => 'test.log',
-debug => TRUE,
}
);
$log->info("Hello world!");
or ...
use XAS::System;
$ddc = XAS::System->module('environment');
$log = XAS::System->module(
logger => {
-filename => $ddc->logfile,
-debug => TRUE,
}
);
$log->info("Hello world!");
or ...
$log = XAS::System->module('logger');
$log->info("Hello world");
DESCRIPTION
This is the the module for logging within the XAS environment, it is a wrapper around Badger::Log. You should read the documentation for that module to learn all the options that are available.
This module provides an extension that allows all options to have a leading dash. This is to be consistent with the rest of the XAS modules. It will also set the correct file permissions on the log files so they can be interchanged within the environment.
By default, the following log levels are active:
info
warn
error
fatal
By default, output will be sent to stderr.
ACCESSORS
filename
This accessor will return the name of the current log file.
Example
$filename = $log->filename;
SEE ALSO
- Badger::Log
- XAS
AUTHOR
Kevin L. Esteb, <kevin@kesteb.us>
COPYRIGHT AND LICENSE
Copyright (C) 2012 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.