addHandler: add a handler to a logger
Description
creates a new named handler list, attaches it to the specified logger
and registers a defines a function as a handler of log records going through the
specified logger.Usage
addHandler(name, action, ..., level=20, logger='',
formatter=defaultFormat)
Arguments
name
the name of the handler
action
the implementation of the handler
...
extra parameters for the action, to be stored in the handler list
level
the level of the handler, defaults to 20 (INFO)
logger
the name of the logger to which to attach the new
handler, defaults to the root logger
formatter
a function taking a record and producing a string.
Details
a handler has a name and at least the three fields:
[object Object],[object Object],[object Object] further a handler may have as many fields as you think you need. keep
in mind the handler (and all of its fields) are passed to the action
function.