You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mike Schrauder <MI...@specialtyblades.com> on 2005/06/07 16:42:07 UTC

debug output to file?

pardon my complete unix ignorance, I have been trying to figure
out how to get debug output to a file so I can go back and look
at it. I also want to look at the marked up email w/ report so
I am using this:

 spamassassin -D -t < test2.txt > test2.out

How could I also redirect the debug output to a file.

i've also tried  spamassassin -D -t < test2.txt > test2.out | more 
just so I could look, but that doesn't work.  Can you give a
windows user a clue?  TIA

Mike Schrauder
Specialty Blades, Inc.


Re: debug output to file?

Posted by David B Funk <db...@engineering.uiowa.edu>.
On Tue, 7 Jun 2005, Bob McClure Jr wrote:

> On Tue, Jun 07, 2005 at 10:42:07AM -0400, Mike Schrauder wrote:
> > pardon my complete unix ignorance, I have been trying to figure
> > out how to get debug output to a file so I can go back and look
[snip..]
> > i've also tried  spamassassin -D -t < test2.txt > test2.out | more
> > just so I could look, but that doesn't work.  Can you give a
> > windows user a clue?  TIA
>
>   spamassassin -D -t < test2.txt > test2.out 2> dbug.out
>
> 2 is the file handle for stderr.

Other trick, if you want stdout & stderr to go into the same file
use:
    spamassassin -D -t < test2.txt > test2.out 2>&1

The syntax '2>' says work on file handle #2, the '>&1' says
make it go to the same place that file handle #1 (usually stdout)
has been routed to.

So if you wanted it all to go into a pipe (so that you can feed it
to 'grep', 'more' or some other utility) use:

  spamassassin -D -t < test2.txt 2>&1 | more

While we're at tricks, if you want to test a particular rule, try:

  spamassassin -t -D rulesrun=255 < test2.txt test2.out 2>&1

The '-D rulesrun=255' option says show the processing of all rules
as they hit if they have a non-zero score. Only issue with this is
that the '__RULE' syntax (for creating meta-rules) have no score and
so don't show. If debugging such critters, change them to '_T_RULE'
names, those have a small but non-zero score and thus show.

-- 
Dave Funk                                  University of Iowa
<dbfunk (at) engineering.uiowa.edu>        College of Engineering
319/335-5751   FAX: 319/384-0549           1256 Seamans Center
Sys_admin/Postmaster/cell_admin            Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{

Re: debug output to file?

Posted by Bob McClure Jr <ro...@earthlink.net>.
On Tue, Jun 07, 2005 at 10:42:07AM -0400, Mike Schrauder wrote:
> pardon my complete unix ignorance, I have been trying to figure
> out how to get debug output to a file so I can go back and look
> at it. I also want to look at the marked up email w/ report so
> I am using this:
> 
>  spamassassin -D -t < test2.txt > test2.out
> 
> How could I also redirect the debug output to a file.
> 
> i've also tried  spamassassin -D -t < test2.txt > test2.out | more 
> just so I could look, but that doesn't work.  Can you give a
> windows user a clue?  TIA

  spamassassin -D -t < test2.txt > test2.out 2> dbug.out

2 is the file handle for stderr.

> Mike Schrauder
> Specialty Blades, Inc.

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure@earthlink.net  http://www.bobcatos.com
God is more interested in our availability than our ability.