__init__(self,
server,
on=None,
traceOffset=0,
msgCountLimit=1000000,
stackMax=1,
errorHandler=None,
catsEnable=None,
catsDisable=None,
seFilesExclude=None,
name=None,
extractStack=True)
(Constructor)
| source code
|
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature
- Parameters:
catsEnable - None or list of cat strings,
e.g.("E","W",""). (Remember, the
empty cat "" is the default.) If a list is specified,
only these cats are logged, all other calls are ignored. If None,
all cats are enabled.
catsDisable - All cats in this list are ignored. Only one of the parameters
catsEnable and catsDisable can be specified, not both same time.
on - DONT USE ANYMORE. Use catsEnable=() to switch off the log.
traceOffset - Adjusts the start point of the logged stack trace. Default == 0.
Increase to 1 if you have wrapped the log, otherwise, all stack
paths will start with your wrapper function. Too high values are
silently adjusted to the highest value possible.
stackMax - 0==show no stacktrace, 1==log one stack line (the line where
log(...) was called), 2==log two stack lines, and so on. Default:
1 (==log callers line and nothing else.) See also: extractStack
parameter.
errorHandler - Gets any Exception that occurs while logging. (e.g.a connection
failure to the log server) If handler is None: No handling, your
application will receive any exception occurring inside the log()
call. For convenience, you may provide one of these strings:
"stderr","stdout","silent"
(case-insensitive). These strings are translated into the
appropriate built-in "~ErrorHandler" class.
seFilesExclude - Stack Extraction-Excluded Files. None (==nothing to exclude), or
a callable that returns True/False when given a filename. When
True, the file does NOT appear in the call path. None is acepted
instead of False too, just to enable pragmatic ideas like
seFilesExclude=re.compile("foo/bar.*").search (which
exludes all foo/bar* files). Note: The callers file name (cfn) is
never excluded this way, only the rest of the trace may be
"censored".
name - str, defaults to class name. For individual use (to identify the
log object). The log itself does not evaluate it but use it with
its __repr__/__str__ method.
extractStack - If False, stack extraction is disabled. This improves performance
(can be more than twice), but any stack related functionality
will not work (e.g.line indention to visualize call hierarchy).
- Overrides:
object.__init__
|