[GNC-dev] Logging Information in the Wiki

Geert Janssens geert.gnucash at kobaltwit.be
Tue Sep 4 03:25:03 EDT 2018


Op dinsdag 4 september 2018 05:23:17 CEST schreef David Cousens:
> I had to trawl through the code in qoflog.cpp to make sense of how the
> logging works. I now feel I have  a basic grasp of how to control that. I
> did not find modifying ./gnucash/log.conf had much effect primarily because
> I didn't really have a grip on how logging woked when i tried using it and I
> found it much easier to use the command line options to do what I wanted
> which was to enable logging specifically at debug level for the gnc,import
> module (and not anything else) and redirect the output from the
> /tmp/gnucash.trace file to a logfile in my home directory which I could read
> without root privileges. I also don't want to modify ./gnucash/log.conf for
> development versionsas that affects my GnuCash production version logging
> as well as the development whereas with the command line options changes
> are limited to the built development version.

It's not ./gnucash/log.conf, but ~/.gnucash/log.conf. So a hidden directory in 
you home dir.

And in addition that information is also only valid for gnucash 2.6.x and 
older. The file has been moved to a new location for 3.x. I have updated the 
wiki page to show this.

> 
> Does anyone have any problem with me creating a breakout page from the above
> page for developers which describes the logging setup information that a
> new developer needs to know both to control debugging code and incorporate
> logging information in code they write while it is still fresh in my mind?
> (At my age this might not be very long.)
> 
> I am thinking along the lines fo describing the log domain setup and the log
> levels as they pertain to Gnucash  and the macros that relate to them that
> can be used to generate debug information as well as the command line
> switches and how they interact with the system.

Like John I don't see much reason to make it separate pages. What you describe 
can be separate sections on one page as well. But I don't have a strong 
opinion or preference here.

Geert




More information about the gnucash-devel mailing list