PET::Log

General logger class used by PET.  Keeps its logfiles in $BASEPATH/apilogs.

In general, logging looks like this

$instance->$logname($message,[$debuglevel]);

$logname can be error (e), warning (w), debug (d), performance (p), $message is the text to log, while $debuglevel (optional) is the debug level under which debug logging is allowed for a given log call.

If not in “strict loggin mode”, AUTOLOAD allows the calling of other methods, too.

Summary
PET::LogGeneral logger class used by PET.
Variables
$DISPPET::Dispatcher instance.
%ALLOWEDList of allowed logfiles when runing in strict mode.
%MAPPINGSMap some shortcuts to longer function names.
%HANDLERSStore filehandlers temporarily.
$STRICTTrue if we run under “strict mode”.
$CONF
Functions
new
_log($type,$message)This is the logfile-writer.
AUTOLOAD
DESTROY

Variables

$DISP

our $DISP

PET::Dispatcher instance.

%ALLOWED

our %ALLOWED

List of allowed logfiles when runing in strict mode.  Also disallowed “new”!

%MAPPINGS

our %MAPPINGS

Map some shortcuts to longer function names.

%HANDLERS

our %HANDLERS

Store filehandlers temporarily.

$STRICT

our $STRICT

True if we run under “strict mode”.

$CONF

our $CONF

Functions

new

sub new

_log($type,$message)

sub _log

This is the logfile-writer.

AUTOLOAD

sub AUTOLOAD

DESTROY

sub DESTROY
our $DISP
PET::Dispatcher instance.
our %ALLOWED
List of allowed logfiles when runing in strict mode.
our %MAPPINGS
Map some shortcuts to longer function names.
our %HANDLERS
Store filehandlers temporarily.
our $STRICT
True if we run under “strict mode”.
our $CONF
sub new
sub _log
This is the logfile-writer.
sub AUTOLOAD
sub DESTROY
Close