Overview | Index by: file name | procedure name | procedure call | annotation

log.tcl Annotations

Created from source/log.tcl
Library for sending and receiving formatted messages to syslog.

Procedure Summary
Alert { args }
          
clearLogs { }
          
Critical { args }
          
Debug { args }
          
Emergency { args }
          
Error { args }
          
getLogs { args }
          
Info { args }
          
log { severity args }
          It formats a message and logs it to syslog.
mqsync { }
          Force processing of buffered
Notice { args }
          
severity2num { sev }
          Convert a severity expressed as a number 0-7, to the equivalent
severity2str { num }
          Convert a severity expressed as a number 0-7, to the equivalent
syslog_monitor { prog handler }
          Register a proc to be called whenever a particular application logs something to syslog.
syslog_mq_hdlr { queue command }
          Handler for the syslog message queue.
Warning { args }
          

Procedure Detail

Alert

proc Alert { args }
Defined in:
log.tcl, line 279

clearLogs

proc clearLogs {  }
Defined in:
log.tcl, line 109

Critical

proc Critical { args }
Defined in:
log.tcl, line 278

Debug

proc Debug { args }
Defined in:
log.tcl, line 273

Emergency

proc Emergency { args }
Defined in:
log.tcl, line 280

Error

proc Error { args }
Defined in:
log.tcl, line 277

getLogs

proc getLogs { args }
Defined in:
log.tcl, line 82

Info

proc Info { args }
Defined in:
log.tcl, line 274

log

proc log { severity args }
It formats a message and logs it to syslog. If debugging is enabled, then together with the message, the originating procedure, the namespace and thread id are logged as well to facilitate debugging. The commands has the following syntax: log severity ?options? message-part1 message-part2 ... "severity" must be one of: emergency: system is unusable alert: action must be taken immediately critical: critical conditions error: error conditions warning: warning conditions notice: normal but significant condition info: informational messages debug: debug-level messages Case is not significant. It supports the following options: -error : Generate a Tcl error as well, with message the concatenated message-parts. -exit : Exit after logging with specified error code. -stack : Stack error trace. Like in the ::errorInfo Tcl variable. -code : Error code. Like in the ::errorCode Tcl variable. -return : Cause the calling function to return $msg after log has been executed. Useful in order to avoid having the same message in two different lines. -session : The session from which this log request originated. It can be left unspecified. -category : A string to help categorize messages within the context of MikroConf. It can be left unspecified. -- : Optional. Signifies the end of the arguments and that the following arguments will be the severity, and all the rest will be the message-parts
Parameters:
severity - See description above.
args - See description above. @error
Defined in:
log.tcl, line 179

mqsync

proc mqsync {  }
Force processing of buffered messages.
Defined in:
log.tcl, line 283

Notice

proc Notice { args }
Defined in:
log.tcl, line 275

severity2num

proc severity2num { sev }
Convert a severity expressed as a number 0-7, to the equivalent string.
Parameters:
num - The symbolic number for a severity level.
Returns:
The corresponding string describing the severity level. @error
Defined in:
log.tcl, line 141

severity2str

proc severity2str { num }
Convert a severity expressed as a number 0-7, to the equivalent string.
Parameters:
num - The symbolic number for a severity level.
Returns:
The corresponding string describing the severity level. @error
Defined in:
log.tcl, line 129

syslog_monitor

proc syslog_monitor { prog handler }
Register a proc to be called whenever a particular application logs something to syslog. Whatever was logged will be passed to the handler in a list (one list item - one line of log)
Parameters:
prog - The name of the application/daemon/program to match
handler - The procedure (handler) to call when a match succeeds
Defined in:
log.tcl, line 118

syslog_mq_hdlr

proc syslog_mq_hdlr { queue command }
Handler for the syslog message queue. It will be notified whenever syslogd writes something to syslog. It then dispatches the logs to appropriate application-specific handlers, as registered via syslog_monitor.
Parameters:
queue - The message queue name.
command - The command that corresponds to the syslog message queue.
Defined in:
log.tcl, line 32

Warning

proc Warning { args }
Defined in:
log.tcl, line 276

Overview | Index by: file name | procedure name | procedure call | annotation
File generated 2010-03-13 at 22:28.