gnc-trace module numbers

Derek Atkins warlord at MIT.EDU
Wed Sep 28 08:50:18 EDT 2005

Neil Williams <linux at> writes:

> On Tuesday 27 September 2005 2:08 pm, Derek Atkins wrote:
>> Neil Williams <linux at> writes:
>> >                 gnc_set_logfile(f);
>> Not done.  It uses the default
> It'll need to be done with this change - the default was gnucash.trace and 
> this change is to make the trace less gnucash-specific. The default filename 
> is now qof.trace and each application should set their own filename.

Perhaps qof can just use the "gnome application" name?  I thought
gnome had some way to determine the name of the current app?  Can qof
use that?

>> >                 gnc_set_log_level(MOD_BACKEND, GNC_LOG_DETAIL);
>> >                 gnc_set_log_level(MOD_ENGINE, GNC_LOG_DETAIL);
>> >                 gnc_set_log_level(MOD_IO, GNC_LOG_DETAIL);
>> These are done in the enum-structure in gnc-trace.c and by the
>> command-line through scheme.
>> > I know it's not defined static like that and that gnucash can use command
>> > line options to specify the modules and log detail, I'm hoping it's not
>> > in the Scheme!
>> Why?  Changing the scheme is /EASY/
> I never like editing files I don't understand. 
> :-)

Well, you should really learn to understand it.  The g-wrap specs
are even EASIER to understand -- they're not full scheme, they are
a rather strict subset of scheme!

> How would I implement the filename change?

See above.  That's not something to do in scheme.  That should be done
in the engine initialization routines.  Maybe even in gncmod-engine?

> The use of a hashtable also means gnc_should_log can no longer be inlined as 
> was the original plan in gnc-trace.c.

The inlining was just for speed.


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list