→If debugging is enabled
GRAMPS Logging System is based on the [ http://docs.python.org/ lib/ module-logging.html Python]s logging facility.
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.
|+Handler instance parameters
The usage of the switch is quite simple:
gramps.py -d "name_of_the_logger"
The name of the root logger is an empty string, thus e.g. <tt>--debug=""</tt> will enable all debug logs.
==So how logging works in
GRAMPS after all?==
===If debugging is not enabled===
* all WARNING and above level logs will be buffered by WarnHandler and can be seen by pressing the warn_button within 3 minutes after the latest log is received.
_LOG.debug('a debug message')
:To see this message in a terminal, one starts
GRAMPS with the debug option followed by the debug logger one wants to see:
python src/gramps.py -d '.pageview'