NAME

ApLog - logging routines

logconfig - configure the logging subsystem

    logconfig(
                trace => traceLevel,
                debug => debugLevel,
                logfile => filename,
                stamp => 1 | 0
        ) ;
trace

set the trace level to a number between 0 and 100. Default is 0.

debug

set the debug level to a number between 0 and 100. Default is 0.

logfile

set the logfile name. Default is aplog.

stamp

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 - put a message and its log level into the log

loglsay(level, "message" [, "more message"] ) ;

logsay - put a simple message in the log

logsay("my message")

logtrc - put an execution trace message into the log

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 - put a debugging message into the log

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 - put a error message into the log

logerr("an error message") ;

The message is recorded with a prefix to indicate that it is an error.

logwarn - put a warning message into the log

logwarn("an warning message") ;

The message is recorded with a prefix to indicate that it is a warning.

parselog - parse a logfile (or segment of a logfile)

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-2013 Applied Testing and Technology, Inc. All rights reserved.