This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Shotwell Architecture Overview: Logging

Shotwell logs debug messages to the console. It also uses #if’s to selectively include debug code that measures or traces the logic of important or complex code.

Starting in Shotwell 0.6, logging entries go to the file ~/.cache/shotwell/shotwell.log. (This log file may be requested by developers for more information when working through a bug, or even attached to automated bug reports). The default logging level is MESSAGE, WARNING, and CRITICAL.

To increase the log level to the maximum level (log everything), set the environment variable SHOTWELL_LOG=1 before execution. More specific types of log messages can be filtered by not setting SHOTWELL_LOG and only setting desired types, including:

These correspond to the following functions in Vala: info (), debug (), message (), warning (), and critical ().

To log to a different file, set the SHOTWELL_LOG_FILE environment variable. If it’s set to ":console:", logging will go to the console (like the old behavior).

Conditional debug code can be set by defining the appropriate #defines when compiling. These include:

These #defines can be specified by using the configure script:

./configure —define=MEASURE_PIPELINE —define=MEASURE_ENHANCE


2024-10-23 10:58