You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/08/19 04:54:16 UTC

[Bug 3701] New: clean up debugging

http://bugzilla.spamassassin.org/show_bug.cgi?id=3701

           Summary: clean up debugging
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Libraries
        AssignedTo: spamassassin-dev@incubator.apache.org
        ReportedBy: quinlan@pathname.com


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".

And goodbye to the integers!  Goodbye... goodbye.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.