Implements a file and console logger using python's logging facility.
Log levels are, in raising criticality:
It uses configshell's Prefs() backend for storing some of its
parameters, who can then be read/changed by other objects using
Prefs()
|
|
__init__(self,
console_level=None,
logfile=None,
file_level=None)
This class implements the Borg pattern. |
|
|
|
|
_append(self,
msg,
level)
Just appends the message to the logfile if it exists, prefixing it
with the current time and level. |
|
|
|
|
_log(self,
level,
msg)
Do the actual logging. |
|
|
|
|
debug(self,
msg)
Logs a debug message. |
|
|
|
|
exception(self,
msg=None)
Logs an error message and dumps a full stack trace. |
|
|
|
|
verbose(self,
msg)
Logs a verbose message. |
|
|
|
|
info(self,
msg)
Logs an info message. |
|
|
|
|
warning(self,
msg)
Logs a warning message. |
|
|
|
|
error(self,
msg)
Logs an error message. |
|
|
|
|
critical(self,
msg)
Logs a critical message. |
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|