[Gnucash-changes] r12999 - gnucash/trunk/lib/libqof/qof -
Re-enable logging for GnuCash modules that haven't explicitly
set their
Neil Williams
linux at codehelp.co.uk
Sat Jan 28 16:17:51 EST 2006
Actually, it was in the docs all along:
http://cvs.gnucash.org/docs/HEAD/group__Trace.html#ga7
void qof_log_set_level_global ( QofLogLevel level )
Set the logging level for all known log_modules.
Note: Unless a log_module has been registered using qof_log_set_level, it will
be unaffected by this change.
http://cvs.gnucash.org/docs/HEAD/group__Trace.html#ga14
void qof_log_module_foreach ( QofLogCB cb,
gpointer data
)
Iterate over each known log_module
Only log_modules with log_levels set will be available.
http://cvs.gnucash.org/docs/HEAD/group__Trace.html#ga15
gint qof_log_module_count ( void )
Number of log_modules registered
What that all means is that the API was not broken when it moved to libqof,
just clarified.
Where before there was an assumption (based on the explicit list of defined
modules in gnc-trace.h) that everything listed was logged - QOF now makes it
explicit that we start with a clean slate each time. You decide which modules
you want logged - QOF makes no such assumptions. Chris, your patch
reintroduces this assumption by the backdoor and undermines the API. Did you
look at the Doxygen output? Is it unclear? I'll gladly enhance the
documentation if you don't find it sufficiently useful.
Note that even with gnc-trace.h, if a module was not listed in the hardcoded
list, it was also ignored.
Instead of changing gnc-trace all the time, the API allows a more flexible
approach that automatically keeps what we had from the old lists synchronised
AND ensures that any new module can be defined for logging WITHOUT any
changes to any file below lib/libqof.
This was an essential step in the use of QOF outside gnucash because the hard
coded list was completely irrelevant for any non-gnucash process.
I accept I did not post to the list about the removal of this assumption -
instead I did clearly document the results in the Doxygen output by making it
explicit in the qoflog.h file.
Please, Chris, can we revert your change and ditch the assumption?
If there are issues you want clarified in the docs, I'll gladly do that, but
this patch is just plain wrong.
--
Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060128/77fb091e/attachment.bin
More information about the gnucash-devel
mailing list