File 'base/syslog.tcl' (part of 'Pool_Base')


Home | Packages | Files | Procedures | Classes | Keywords | External packages


Written by
Andreas Kupries
Description
General logging facility to avoid having lower libraries to know the actual log mechanism employed by a client application.
Depends on
Tcl
Keywords
logging, syslog, message reporting, error reporting, message levels

::pool::syslog::2color (level)

Argument: levelThe level to convert into a color.
Returns: The color associated to the given level

::pool::syslog::Log2Stderr (level text)

Standard log procedure, writes incoming message to stderr.
Argument: levelLog level of message given.
Argument: textMessage to log

::pool::syslog::def (putsCmd)

Defines a command which will be executed for every message given to the system.
Argument: putsCmdThe script evaluated by ::pool::syslog::syslog to log the incoming messages. Will be called with 2 arguments: The level and the text.

::pool::syslog::defLevel (level putsCmd)

Defines a command which will be executed for every message given to the system and having the specified level.
Argument: levelThe level triggering the execution of putsCmd.
Argument: putsCmdThe script evaluated by ::pool::syslog::syslog to log the incoming messages. Will be called with 2 arguments: The level and the text.

::pool::syslog::levelCmp (lvA lvB)

Argument: lvAThe first level to compare.
Argument: lvBThe second level to compare.
Returns: One of -1, 0, or 1. 0 if lvA and lvB are equal, -1 if lvA is less important than lvB and 1 else.

::pool::syslog::levels ()

Returns: Returns a list containing the names of all log-levels known to the system. The shortcuts are not returned.

::pool::syslog::logLevel (o v)

Type checker procedure for 'getopt'. Accepts all levels known to this module.
Argument: oThe name of the option to check.
Argument: vThe value to check.
Returns: A boolean value. True if and only if v is a level defined here.

::pool::syslog::setStderr ()

Convenience procedure. Installs the standard log procedure (::pool::syslog::Log2Stderr) for all levels.

::pool::syslog::syslog (level args)

Entrypoint to the logger facility, to be used by libraries. The actual log is done by a command defined via ::pool::syslog::def or ::pool::syslog::defLevel.
Argument: levelRelative importance of the logged message. Should be one of the strings returned by ::pool::syslog::levels.
Argument: argslist containing the texts to log.


Generated by AutoDoc 2.1 at 02/20/1999, invoked by Andreas Kupries