The Tcl logging manager library module has the file name logman.tcl. This module manages messages and allows the messages to be dynamically sent to either a local log file (using the personal logging API) or the system logger.
This module uses the personal logging API to send messages to a local log and the system logger API to send messages to the system logger.
Note that in this first version of the Tcl software built by Future Lab, the client/server modules are not included. This includes the system logger API.
This module contains the following global data:
Here is a list of functions in the logging manager library module:
The following modules are required along with this module:
This module requires the definition file:
Declaration : proc logman_start {dest {apname ""}} Parameters : Name : dest Type : string Description : message destination Name : apname Type : string Default: empty Description : application name Returns : zero upon success, one (personal logging) or a sys_log code
This procedure will start logging through the log manager by either starting to log using a local log file or the system log interface depending on the contents of the message destination. The application name parameter is only required (always) for the system logger. If logging has been successfully started with a message destination at least once, you are allowed to pass an empty string for the message destination which indicates to re-start the same destination. This procedure returns a system log code if the system log was requested or zero upon success, one upon failure when the system log was not requested.
Declaration : proc logman_end {}
This procedure will stop the log manager and all logging.
Declaration : proc logman {mes} Parameters : Name : mes Type : string Description : message string
This procedure will output the message string through the log manager to the current destination. The message is only output if the log manager is active (by calling the procedure logman_start).
Declaration : proc logman_is_active {} Returns : 1 if active, 0 otherwise
This procedure will return the status of the log manager.
Declaration : proc logman_get_name {} Returns : current log name or destination
This procedure will obtain and return the current log name or destination.
Declaration : proc logman_console {flag} Parameters : Name : flag Type : boolean number Description : console output flag
This procedure will set whether logging output will be sent to the console/screen. Output will be turned off if the console output flag is zero. Any other value will cause console output to be turned on.
Declaration : proc logman_get_console {} Returns : 1 if console output is on, 0 otherwise
This procedure will return the current log console output flag.