You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by qu...@apache.org on 2005/04/21 11:45:02 UTC
svn commit: r164018 - /spamassassin/trunk/spamd/spamd.raw
Author: quinlan
Date: Thu Apr 21 02:45:01 2005
New Revision: 164018
URL: http://svn.apache.org/viewcvs?rev=164018&view=rev
Log:
fix some logic errors that cause test failures in the new logging code
Modified:
spamassassin/trunk/spamd/spamd.raw
Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/spamd/spamd.raw?rev=164018&r1=164017&r2=164018&view=diff
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Thu Apr 21 02:45:01 2005
@@ -379,19 +379,21 @@
# Logging via syslog is requested.
if ($log_socket ne 'file' && $log_facility ne 'null') {
- if (Mail::SpamAssassin::Logger::add(method => 'syslog',
- socket => $log_socket,
- facility => $log_facility))
+ if (!Mail::SpamAssassin::Logger::add(method => 'syslog',
+ socket => $log_socket,
+ facility => $log_facility))
{
- Mail::SpamAssassin::Logger::remove('stderr');
+ # syslog method failed
+ $log_facility = 'stderr';
}
}
# Otherwise, the user wants to log to some file.
elsif ($log_facility eq 'file') {
- if (Mail::SpamAssassin::Logger::add(method => 'file',
- filename => $log_file))
+ if (!Mail::SpamAssassin::Logger::add(method => 'file',
+ filename => $log_file))
{
- Mail::SpamAssassin::Logger::remove('stderr');
+ # file method failed
+ $log_facility = 'stderr';
}
}
@@ -752,7 +754,7 @@
# now allow waiting processes to connect, if they're watching the log.
# The test suite does this!
-dbg("info: server pid: $$\n");
+info("spamd: server pid: $$\n");
if ($scaling) {
$scaling->set_server_fh($server);