Debug Messages

David Relson relson at osagesoftware.com
Wed Oct 23 03:11:51 CEST 2002


At 07:30 PM 10/22/02, Matthias Andree wrote:


>I missed that. Log message "classes" like these sound useful to me.

What I've got is (roughly):

         global variable debug_mask for storing the bit mask.

         command line option '-x flags' that takes an argument with one or 
more letters denoting debug classes, i.e.

                 g - general
                 l - lexer
                 d - database
                 s - spamicity
                 w - wordlist

         and a set of testing debug macros, i.e.

                 DEBUG_GENERAL(level)
                 DEBUG_LEXER(level)

                 etc.

         at the moment,

                 DEBUG_DATABASE(...) is in use in datastore_db.c
                 DEBUG_WORDLIST(...) is in use in wordlists.c

         two new files:

                 debug.h to define the enumerated type and the macros
                 debug.c to parse the "flags" and set bits in 'debug_mask'

That's the general idea.  I'm open to comments and suggestions.

I'll be spending the next couple of hours with my family, and then, I'll 
revise what I've got and release to CVS.





More information about the bogofilter-dev mailing list