gnc-trace module numbers

Derek Atkins warlord at MIT.EDU
Thu Sep 29 08:17:38 EDT 2005


Quoting Neil Williams <linux at codehelp.co.uk>:

> OK, that's where I've added new versions of these calls (using strings):
>
>> >                 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
>
> The enum no longer exists (because the QofLogModule is a gchar*).

Just because QofLogModule is a gchar* doesn't mean the structure has to 
go away.
You could just as easily use a loop to load the structure into the hashtable
at runtime.  But whatever.

>> and by the
>> command-line through scheme.
>
> That's what I can't find - how to tell the scheme to accept a gchar 
> instead of
> an int for gnc_set_log_level.

Did you even look at gw-engine-spec.scm?  Look for "gnc_set_log_level".
If you're still confused, find another existing API that looks close to
what you want.

-derek

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



More information about the gnucash-devel mailing list