Bryan Hoover wrote:

BH> Harry Putnam wrote:
BH>
BH> > So I think Duncan has hit it, in that -d (daemonize) silences the
BH> > debug output.
BH>
BH> Indeed sir.  I was woefully ignorant of the behavior.
BH>
BH> Does that mean too, that when spamd calls SA, SA does not log as usual?
BH> My thought was that if there are problems in your config files, they
BH> would show up in SA, and therefore, SA's log file.

Most (all?) logging in SA is done through calling Mail::SpamAssassin::dbg(),
either directly or indirectly.  Mail::SpamAssassin::dbg() simply calls warn(),
which tries to print to the controlling tty.  spamd -d will detach from the tty,
so warn() messages will vanish into the bit bucket.  What spamd should probably
more correctly do is intercept future warn() messages, and redirect them to
syslog.  From perldoc -f warn it looks like this should be fairly
straightforward by installing a $SIG{__WARN__} handler.  Something like:

$SIG{__WARN__} = sub { logmsg($_[0]); }

Does that look right to everyone?

C


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to