Overview | Index by: file name |
procedure name |
procedure call |
annotation
Created from source/log.tcl
- Library for sending and receiving formatted messages to syslog.
proc Alert { args }
- Defined in:
- log.tcl, line 279
proc clearLogs { }
- Defined in:
- log.tcl, line 109
proc Critical { args }
- Defined in:
- log.tcl, line 278
proc Debug { args }
- Defined in:
- log.tcl, line 273
proc Emergency { args }
- Defined in:
- log.tcl, line 280
proc Error { args }
- Defined in:
- log.tcl, line 277
proc getLogs { args }
- Defined in:
- log.tcl, line 82
proc Info { args }
- Defined in:
- log.tcl, line 274
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
proc mqsync { }
- Force processing of buffered messages.
- Defined in:
- log.tcl, line 283
proc Notice { args }
- Defined in:
- log.tcl, line 275
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
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
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
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
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.