ApLog - logging routines
logconfig( trace => traceLevel, debug => debugLevel, logfile => filename, stamp => 1 | 0 ) ;
set the trace level to a number between 0 and 100. Default is 0.
set the debug level to a number between 0 and 100. Default is 0.
set the logfile name. Default is aplog.
Indicate whether the timestamp should be put on each log line automatically or not. Default is 1, or yes.
Establishes the parameters for logging, and opens the logfile if it is not already open.
loglsay(level, "message" [, "more message"] ) ;
logtrc(level, "a trace message") ;
If the verbosity level is set >= the level of the message, the message is recorded into the log. Otherwise it is ignored.
logdbg(level, "a debugging message") ;
If the debug level is set >= the level of the message, the message is recorded into the log. Otherwise it is ignored.
logerr("an error message") ;
The message is recorded with a prefix to indicate that it is an error.
logwarn("an warning message") ;
The message is recorded with a prefix to indicate that it is a warning.
my $logRef = parselog(filename [, startline, numentries]) ;
filename is the path to a logfile.
startline is a starting line number - defaults to 0
numentries is the number of lines to return
Returns a reference to array of arrays:
ref-> is line 0 ref->-> timestamp  pid  level  subroutine  message
Copyright © 2000-2013 Applied Testing and Technology, Inc. All rights reserved.