[GNC-dev] Logging Information in the Wiki

Geert Janssens geert.gnucash at kobaltwit.be
Tue Sep 4 09:39:20 EDT 2018


Op dinsdag 4 september 2018 14:24:06 CEST schreef David Cousens:
> John Geert,
> 
> I was going for the breakouts to make more detail about  the log-levels and
> log-domains available while not making the current page  too large or not
> easily readable. I have added breakout pages from links from log-domain and
> log-level where they are first mentioned in the text on the logging page. if
> you have time you might check that i haven't blundered too badly in my
> understanding of the logging implementation.

Thanks for working on detailing all this.

The log domains listed in GnuCash Log Domains is incomplete. There are several 
additional log domains defined in the CMakeFiles and then passed as extra 
parameter to specific target builds. You can search the CMakeLists.txt files 
recursively for G_LOG_DOMAIN to find them.

Also the explanation of the three forms is lacking a proper guideline on when 
to use which form. It's not that form one and two can be used interchangeably 
for example. Unfortunately it's an area of gnucash I never bothered to study 
in detail, so I can't give you a definitive guide either right now.

I know the first form is used to configure the log-domain for our own logging 
code (named QofLog). This code builds on top of glib2's log library. And to 
tell glib2's log library the log-domain to use, you normally set G_LOG_DOMAIN. 
I assume (though haven't verified) that setting log_module for QofLog will do 
what is necessary to configure the underlying glib2's log library. However I'm 
not sure that only setting G_LOG_DOMAIN will also properly configure our own 
QofLog code.

So it may well be possible the second and third forms should not appear at 
all, but are the result of misunderstanding or laziness.

> Thanks for fixing the API
> link. My bad on the /.gnucash - I did realize it was a hidden directory,
> just stuffed it up while editing it. I'll work around the updated locations
> and put a link to the Configuration locations page itself from the logging
> page.
Unless I misunderstand you, I think I did this for you already.

> The Logging API page covers a fair bit of what I had in the
>  log level breakout more completely so I will remove it. The breakout for
> the log-domains I produced does have some  infomation not in the Logging API
> page which might be useful to incorporate.
> 
Ok.

> I can add a section to the wiki logging page on using the command line to
> configure debugging. I found that more useful than modifying
> ~/.gnucash/log.conf as modifying log.conf affected  a production version of
> Gnuccash I use for accounting as well as a development build I was debugging

Sure do.

Geert




More information about the gnucash-devel mailing list