4Suite
™
API Documentation
►
Module
Ft
.
Server
.
Server
.
Lib
.LogUtil
Functions and classes related to message logging
Copyright 2004 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/
Classes:
Logger
,
NullLogger
,
StreamLogger
,
ThreadSafeFile
Functions:
FromString
Fields:
DEFAULT_LOGGER_BUFSIZE
,
LOG_ALERT
,
LOG_CRIT
,
LOG_DEBUG
,
LOG_EMERG
,
LOG_ERR
,
LOG_ERROR
,
LOG_INFO
,
LOG_NOTICE
,
LOG_WARN
,
LOG_WARNING
,
kword
,
value
Classes
class
Logger
Methods
__init__
(
self
,
ident
,
logFile
,
maxLevel
=('info', 6)
,
showPid
=0
)
__str__
(
self
)
alert
(
self
,
msg
)
clone
(
self
,
ident
,
logLevel
=None
,
showPid
=None
)
critical
(
self
,
msg
)
debug
(
self
,
msg
)
emergency
(
self
,
msg
)
error
(
self
,
msg
)
info
(
self
,
msg
)
log
(
self
, (
priority
,
level
),
message
)
notice
(
self
,
msg
)
warning
(
self
,
msg
)
class
NullLogger
Methods
alert
(
self
,
msg
)
critical
(
self
,
msg
)
debug
(
self
,
msg
)
emergency
(
self
,
msg
)
error
(
self
,
msg
)
info
(
self
,
msg
)
notice
(
self
,
msg
)
warning
(
self
,
msg
)
class
StreamLogger
A wrapper around a Logger instance which allows the log facility to be used in place of a stream object.
Methods
__init__
(
self
,
logger
,
priority
)
flush
(
self
)
isatty
(
self
)
write
(
self
,
str
)
class
ThreadSafeFile
Methods
__init__
(
self
,
name
)
__str__
(
self
)
write
(
self
,
data
)
Functions
FromString
(
level
)
Fields
DEFAULT_LOGGER_BUFSIZE
= 600
LOG_ALERT
= ('alert', 1)
LOG_CRIT
= ('crit', 2)
LOG_DEBUG
= ('debug', 7)
LOG_EMERG
= ('emerg', 0)
LOG_ERR
= ('error', 3)
LOG_ERROR
= ('error', 3)
LOG_INFO
= ('info', 6)
LOG_NOTICE
= ('notice', 5)
LOG_WARN
= ('warn', 4)
LOG_WARNING
= ('warn', 4)
kword
= 'LOG_CRIT'
value
= ('crit', 2)