XAS::Lib::Log - A class for logging in the XAS Environment
use XAS::Lib::Log; my $log = XAS::Lib::Log->new(); $log->debug('a debug message'); $log->info('an info message'); $log->warn('a warning message'); $log->error('an error message'); $log->fatal('a fatal error message'); $log->trace('a tracing message');
This module defines a simple logger for messages generated by an application. It is intentionally very simple in design, providing the bare minimum in functionality with the possibility for extension by sub-classing.
This will initialize the base object.
This will query or toggle the log level. When toggled that particular level is set. There is no hierarchy of log levels.
The log level to toggle. This can be one of the following:
info, warn, error, fatal, debug, trace
An optional valve. It needs to be 0 or 1 to set the level.
This method will log an entry with an level of "info".
The message to write out. This can be an array which will be joined with a "space" separator.
This method will log an entry with an level of "warn".
This method will log an entry with an level of "error".
This method will log an entry with an level of "fatal".
This method will log an entry with an level of "debug". By default this level is turned off.
This method will log an entry with an level of "trace".
The line to write out. This can be an array which will be joined with a "space" separator.
The pre-defined message string. Usually in a message file.
The items to be used in the pre-defined message.
This method will log an entry with an level of "debug".
Kevin L. Esteb, <kevin@kesteb.us>
Copyright (c) 2012-2015 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.
To install XAS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAS
CPAN shell
perl -MCPAN -e shell install XAS
For more information on module installation, please visit the detailed CPAN module installation guide.