http://bugzilla.spamassassin.org/show_bug.cgi?id=3703
Summary: clean up debugging Product: Spamassassin Version: SVN Trunk (Latest Devel Version) Platform: All OS/Version: All Status: NEW Severity: normal Priority: P3 Component: Libraries AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This bug is not about syslog or logging, only the API used to: - turn on debugging all of the code OR parts of the code - how dbg(), warn(), and die() should be called in our code - changing how we decide whether or not a specific facility is currently in debug-mode Debugging is a bit of a mess. It's very all or none and changing debugging levels for different sections of code is a real pain. For 3.1, I propose a minimal set of changes to fix the major problems. First, we will continue to have three "levels" of importance: die(), warn(), and dbg(). Later, we can consider an additional info() level between warn() and dbg(). Later. At all times, die() and warn() messages are output. dbg() messages remain optional. As much as possible, all die(), warn(), and dbg() messages will be prefixed with a facility name, like "dns: foo", "bayes: bar", or "eval: gurgle". -D means debugging is on for everything -D=dns,bayes means debugging is turned on for those facilities The facilties debugging list is just an array stored somewhere. Then dbg("string") is only printed if $1 from /^([^:]+)/ is listed in that array (or "all") is set. The facility names are purely informational and for consistency in warn() and die() messages. So you'd better use a facility unless you only want your dbg() be printed for "all". ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.