stdout

David Relson relson at osagesoftware.com
Fri Sep 26 17:42:44 CEST 2003


On 26 Sep 2003 11:11:57 -0400
Tom Anderson <tanderso at oac-design.com> wrote:

> Matthias,
> 
> > No, it just prints to stderr. I wouldn't call that bypassing since
> > stderr is a standard facility of avoiding piping mail somewhere
> > where you don't want it.
> 
> You're right... I thought I had all of my bases covered by using the
> -D switch, however that only directs -v to stdout; -vv(vv) still gets
> split between stdout and stderr.  
> 
> > You can add 2>&1 to your bogofilter call to have stderr and stdout
> > captured.
> 
> I thought of that too, but when I do that, the stderr string gets
> concatenated in the middle of the stdout string, or vice versa,
> particularly when using the more verbose outputs.  My current solution
> is to direct stderr to a file, and then read that in and paste it
> where I want in my output.  If bogofilter could output more reliably,
> maybe I could eliminate this extra step.

Tom,

Bogofilter's normal output is to stdout.  Help, usage, and error
messages go to stderr.  Debug messages normally go to stderr, but will
be output to stdout if '-D' is used.  Under normal usage, the debug
messages don't appear.  They're activated by the '-x *' options  (where
'*' is any of several characters specifying which debug output is
wanted).

What output are you seeing on stderr that you want on stdout?  It's
always possible that a print statement specifies the wrong destination.

As to intermixing of stdout and stderr, that can be corrected using
fflush.  However, I'm unaware of any need for that.  You'll have to
enlighten me :->

David






More information about the Bogofilter mailing list