[spambayes-bugs] [ spambayes-Patches-789319 ] storage.py verbose
prints to stderr
SourceForge.net
noreply at sourceforge.net
Wed Dec 17 01:52:08 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:
https://sourceforge.net/tracker/?func=detail&atid=498105&aid=789319&group_id=61702
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:52
Message:
Logged In: YES
user_id=14198
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: Mark Hammond (mhammond)
Date: 2003-12-17 17:51
Message:
Logged In: YES
user_id=14198
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
Message:
Logged In: YES
user_id=552329
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:
https://sourceforge.net/tracker/?func=detail&atid=498105&aid=789319&group_id=61702
More information about the Spambayes-bugs
mailing list