Jump to: navigation, search

Logging system

331 bytes added, 23:46, 11 May 2020
If debugging is enabled
The Gramps Logging System is based on [http Python]s logging facility.
==Handler subclasses==
The RotateHandler, GtkHandler and StreamHandler are all instantiated in <tt></tt> (setup_logging), while Warnhandler is instantiated in <tt></tt> (DisplayState.__init__). Rotatehandler is attached also to GtkHandler for the purpose described in GtkHandler description. Each Handler instance has a custom formatter assigned.
{| {{prettytable}}class="wikitable sortable"
|+Handler instance parameters
The name of the root logger is an empty string, thus e.g. <tt>--debug=""</tt> will enable all debug logs.
<blockquote>'''{{man warn|Note!''' |The argument of the switch is <u>not</u> optional.</blockquote>}}
==So how logging works in Gramps after all?==
python src/ -d '.pageview'
:Strings need to be double-quoted on Windows, this is the Windows equivalent of the above command (with the "all in one installer" executed from "C:\Program Files\GrampsAIO64-5.1.2"):
grampsw.exe -d ".pageview"
:On Windows the log output goes into the file "%AppData%\gramps\Gramps51.log" (which is cleared every time the app restarts).

Navigation menu