Home | Trees | Index | Help |
|
---|
|
Filterer --+ | Handler --+ | SysLogHandler
Method Summary | |
---|---|
__init__(self,
address,
facility)
Initialize a handler. | |
close(self)
Closes the socket. | |
emit(self,
record)
Emit a record. | |
encodePriority(self,
facility,
priority)
Encode the facility and priority. | |
Inherited from Handler | |
acquire(self)
Acquire the I/O thread lock. | |
createLock(self)
Acquire a thread lock for serializing access to the underlying I/O. | |
flush(self)
Ensure all logging output has been flushed. | |
format(self,
record)
Format the specified record. | |
handle(self,
record)
Conditionally emit the specified logging record. | |
handleError(self,
record)
Handle errors which occur during an emit() call. | |
release(self)
Release the I/O thread lock. | |
setFormatter(self,
fmt)
Set the formatter for this handler. | |
setLevel(self,
level)
Set the logging level of this handler. | |
Inherited from Filterer | |
addFilter(self,
filter)
Add the specified filter to this handler. | |
filter(self,
record)
Determine if a record is loggable by consulting all the filters. | |
removeFilter(self,
filter)
Remove the specified filter from this handler. |
Class Variable Summary | |
---|---|
dict | facility_names = {'kern': 0, 'daemon': 3, 'uucp': 8, 'lo... |
int | LOG_ALERT = 1 |
int | LOG_AUTH = 4 |
int | LOG_AUTHPRIV = 10 |
int | LOG_CRIT = 2 |
int | LOG_CRON = 9 |
int | LOG_DAEMON = 3 |
int | LOG_DEBUG = 7 |
int | LOG_EMERG = 0 |
int | LOG_ERR = 3 |
str | log_format_string = '<%d>%s\x00' |
int | LOG_INFO = 6 |
int | LOG_KERN = 0 |
int | LOG_LOCAL0 = 16 |
int | LOG_LOCAL1 = 17 |
int | LOG_LOCAL2 = 18 |
int | LOG_LOCAL3 = 19 |
int | LOG_LOCAL4 = 20 |
int | LOG_LOCAL5 = 21 |
int | LOG_LOCAL6 = 22 |
int | LOG_LOCAL7 = 23 |
int | LOG_LPR = 6 |
int | LOG_MAIL = 2 |
int | LOG_NEWS = 7 |
int | LOG_NOTICE = 5 |
int | LOG_SYSLOG = 5 |
int | LOG_USER = 1 |
int | LOG_UUCP = 8 |
int | LOG_WARNING = 4 |
dict | priority_names = {'info': 6, 'notice': 5, 'err': 3, 'war... |
Method Details |
---|
__init__(self,
address=('localhost', 514),
facility=1)
|
close(self)Closes the socket.
|
emit(self, record)Emit a record. The record is formatted, and then sent to the syslog server. If exception information is present, it is NOT sent to the server.
|
encodePriority(self, facility, priority)Encode the facility and priority. You can pass in strings or integers - if strings are passed, the facility_names and priority_names mapping dictionaries are used to convert them to integers. |
Class Variable Details |
---|
facility_names
|
LOG_ALERT
|
LOG_AUTH
|
LOG_AUTHPRIV
|
LOG_CRIT
|
LOG_CRON
|
LOG_DAEMON
|
LOG_DEBUG
|
LOG_EMERG
|
LOG_ERR
|
log_format_string
|
LOG_INFO
|
LOG_KERN
|
LOG_LOCAL0
|
LOG_LOCAL1
|
LOG_LOCAL2
|
LOG_LOCAL3
|
LOG_LOCAL4
|
LOG_LOCAL5
|
LOG_LOCAL6
|
LOG_LOCAL7
|
LOG_LPR
|
LOG_MAIL
|
LOG_NEWS
|
LOG_NOTICE
|
LOG_SYSLOG
|
LOG_USER
|
LOG_UUCP
|
LOG_WARNING
|
priority_names
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Oct 13 20:20:57 2005 | http://epydoc.sf.net |