[spambayes-bugs] [ spambayes-Patches-789319 ] storage.py verbose prints to stderr

SourceForge.net noreply at sourceforge.net
Wed Dec 17 01:51:13 EST 2003

Patches item #789319, was opened at 2003-08-16 01:59
Message generated for change (Comment added) made by mhammond
You can respond by visiting: 

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Anthony Baxter (anthonybaxter)
Summary: storage.py verbose prints to stderr

Initial Comment:
When the global verbose option is set, storage.py 
dumps a bunch of info messages to stdout.  For people
unfortunate enough to be running a SpamBayes tool
which dumps email to stdout, this causes problems.

The attached patch changes the prints so they go to
stderr instead.  I'd just apply this but I don't know if there
was a valid reason for such messages go to stdout.

Assigning to Anthony 'cuz it appears that most of the prints
were added on his watch... (that will teach you to check
stuff in! ;-)


>Comment By: Mark Hammond (mhammond)
Date: 2003-12-17 17:51

Logged In: YES 

Just browsing, and saw this :)

The patch includes functionality other than simply changing
the prints - are these necessary or part of a different change?

Otherwise, I think the print changes should just be checked
in - no need to turn this patch into "better logging" - just
s/print/print >>sys.stderr,/ should be fine.


Comment By: Tony Meyer (anadelonbrin)
Date: 2003-08-16 15:31

Logged In: YES 

It's not just storage.py that does this - corpus.py does as 
well (when using pop3proxy, for example).  Although this 
doesn't actually cause a problem like when using a tool that 
needs the stdout output, it's still (IMO) a PITA.

Two solutions come to mind:
 o We're happy that storage.py and corpus.py work as 
expected, and so a lot of these prints can be removed (and 
the ones that aren't can go to stderr)
 o We follow the example of the OL plug-in and change the 
verbose option to an integer, and have these messages print 
(to stderr) only at certain levels of verbosity.

Hmm...maybe this should be going to spambayes-dev?  (But 
then maybe Anthony will just do all of this ;)


You can respond by visiting: 

More information about the Spambayes-bugs mailing list