[GNC-dev] Logging Information in the Wiki

John Ralls jralls at ceridwen.us
Mon Sep 3 23:46:10 EDT 2018



> On Sep 3, 2018, at 8:23 PM, David Cousens <davidcousens at bigpond.com> wrote:
> 
> I recently had to find out how to setup logging while debugging a new feature
> request and found the information on the wiki
> https://wiki.gnucash.org/wiki/Logging fairly terse. I ended up spending a
> day or two reading up on GLib which was not much use as the Glib functions
> are incorporated inside macros in Gnucash. The link to the logging API
> documnetation on the above page is broken and I can no longer find the page
> in the Wiki with a search. The information there seems incomplete and pretty
> dated.
> 
> 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.r
> 
> 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.

I’ve fixed the API docs URI.

I don’t think we need a separate wiki page, feel free to rewrite that one. 

Regards,
John Ralls


More information about the gnucash-devel mailing list