[Gnucash-changes] r12999 - gnucash/trunk/lib/libqof/qof -
Re-enable logging for GnuCash modules that haven't explicitly
set their
Chris Shoemaker
c.shoemaker at cox.net
Sat Jan 28 13:58:46 EST 2006
On Sat, Jan 28, 2006 at 06:02:55PM +0000, Neil Williams wrote:
> On Saturday 28 January 2006 5:17 pm, Chris Shoemaker wrote:
> > Author: chris
> > Modified:
> > gnucash/trunk/lib/libqof/qof/qoflog.c
> > Log:
> > Re-enable logging for GnuCash modules that haven't explicitly set their
> > own levels.
>
> Chris, the API for this is qof_log_set_global - please don't mess up the
> log_check function because this breaks pilot-qof behaviour!
Neil, please read the code.
1) qof_log_set_global doesn't exist.
2) qof_log_set_level_global does.
3) This patch actually changes qof_log_set_level_global, so I
obviously know about it.
> I would like this patch reverted and a call to qof_log_set_global set in
> gnucash-bin.c (or somewhere else that is gnucash-specific).
Umm, it's already been in gnucash-bin.c for quite a while. It doesn't
do what you think it does.
> Call qof_log_set_level_global to a default level and then set selected modules
> to higher or lower levels.
>
> If modules aren't being logged, it is not up to QOF to overrule the process.
>
> > +static QofLogLevel global_default_loglevel = 0;
>
> Incompatible with pilot-qof and other qof programs which ONLY enable --debug
> when the option is explicitly added to the command line.
No, it's not incompatible with anything.
>
> QOF does not log anything unless explicitly requested to do so. It must remain
> so.
>
> > - /* if log_module not found, do not log. */
>
> This is the API.
That's broken.
> I cannot accept this patch into QOF in this form.
Logging is important for debugging. FTR, you *BROKE* GnuCash's
logging facility when you decided to move it into libqof. You had
plenty of time to fix it and you apparently don't care. I'm *FIXING*
what you broke in a way that's completely compatible with your
intentions, even though I don't agree with your intentions.
If you break things and then tell people "This code is mine now.
Don't fix it" you're going to annoy a lot people.
-chris
More information about the gnucash-devel
mailing list