Debugging API for krb5
Derek Atkins
warlord at MIT.EDU
Thu Feb 5 17:52:50 EST 2004
Personally I don't think 32 modules is too small; if you think it is,
then just up the number to a 64-bit mask. However I think this is
plenty for your specific use. As an example, GnuCash currently has 25
different logging "modules". The user can set the log-level on a
per-module basis. It's implemented as an array of log-levels (one per
module) and each source file declares the modules to which it belongs
by defining a "static short int module" and the top of the file.
The logging routines just do:
if (log_level_array[this_module] > this_msg_log_level)
print_msg(...);
(they are implemented as Macros)
FWIW, Ken's list is still well under 32 modules, and I think his list
is pretty exhastive. It was certainly more exhaustive a list than I
would have come up with.
If you don't care about different levels of logging per module then by
all means use a bitmask instead of an array of levels. In our case it
made sence to allow different levels of logging per-module.
But I still maintain 32 modules is more than sufficient for this case.
You don't need to define a generic logging mechanism that gets used by
everyone else -- you're just defining one for yourself.
-derek
Sam Hartman <hartmans at MIT.EDU> writes:
> Ken, I agree with these requirements, but I think it is important to
> choose a reasonable subset of them so Jeff can implement what he needs
> in a short period of time.
>
> _______________________________________________
> krbdev mailing list krbdev at mit.edu
> https://mailman.mit.edu/mailman/listinfo/krbdev
>
>
--
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 krbdev
mailing list