ApLog |
![]() |
ApLog - Logging routines
logconfig(
trace => traceLevel,
debug => debugLevel,
logfile => filename,
stamp => 1 | 0
) ;
Establishes the parameters for logging, and opens the logfile if it is not already open.
loglsay(level, "message" [, "more message"] ) ;
logsay("my 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->[0] is line 0
ref->[0]->[0] timestamp
[1] pid
[2] level
[3] subroutine
[4] message
Copyright © 2000-2006 Applied Testing and Technology, Inc. All rights reserved.