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. David ----- David Cousens -- Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel