Changes

Jump to: navigation, search

Logging system

28 bytes removed, 01:15, 13 June 2009
m
Handler instances: table
Currently there is one instance of each of the above Handler classes in Gramps. Additionally there's also a StreamHandler() defined with <tt>sys.stderr</tt> as output stream for debugging purposes. All of these Handlers are attached to the root logger, thus active for any later defined logger.
The RotateHandler, GtkHandler and StreamHandler are all instantiated in <tt>gramps.py</tt> (setup_logging), while Warnhandler is instantiated in <tt>DisplayState.py</tt> (DisplayState.__init__). Rotatehandler is attached also to GtkHandler for the purpose described in GtkHandler description. Each Handler instance has a custom formatter assigned.
{| border="1" style="width:80%" cellpadding="2"{{prettytable}}
|+Handler instance parameters
|-
|StreamHandler || DEBUG || "%(relativeCreated)d: %(levelname)s: %(filename)s: line %(lineno)d: %(message)s" || -
|}
 
==Loggers==
The log level of the root logger is set to WARNING by default. In case debugging is activated it may be set to DEBUG (see Enable Debugging). In each module it is recommended to define an own Logger object to be able to understand, which module a certain log (error) is generated from. Setting own log level to a logger is not recommended.
920
edits

Navigation menu