Parent Directory | Revision Log | Patch
--- spamassassin/trunk/spamd/spamd.raw 2004/12/03 00:29:06 109602 +++ spamassassin/trunk/spamd/spamd.raw 2004/12/03 00:33:28 109603 @@ -229,20 +229,11 @@ if ($opt{'version'}) { # Enable debugging, if any areas were specified. We do this already here, # accessing some non-public API so we can use the convenient dbg() routine. -my @DEBUG; +# Don't do this at home (aka any 3rd party tools), kids! if (defined $opt{'debug'}) { - if ($opt{'debug'}) { - @DEBUG = split(/,/, $opt{'debug'}); - if (grep { !/^\S+$/ } @DEBUG) { - warn "bad areas in --debug option\n"; - } - } - else { - @DEBUG = ("all"); - } + $opt{'debug'} ||= 'all'; } -# Don't do this at home (aka any 3rd party tools), kids! -Mail::SpamAssassin::_init_debugger(@DEBUG); +Mail::SpamAssassin::_init_debugger($opt{'debug'}); # bug 2228: make the values of (almost) all parameters which accept file paths @@ -459,7 +450,7 @@ dbg("logger: enabled with:\n" ); # Don't duplicate log messages in debug mode. -if ( $log_facility eq 'stderr' and @DEBUG ) { +if ( $log_facility eq 'stderr' and $Mail::SpamAssassin::DEBUG ) { dbg("logger: facility stderr disabled: already debugging to stderr."); $log_facility = 'null'; } @@ -761,7 +752,7 @@ my $spamtest = Mail::SpamAssassin->new( rules_filename => ( $opt{'configpath'} || 0 ), site_rules_filename => ( $opt{'siteconfigpath'} || 0 ), local_tests_only => ( $opt{'local'} || 0 ), - debug => \@DEBUG, + debug => ( $opt{'debug'} || 0 ), paranoid => ( $opt{'paranoid'} || 0 ), home_dir_for_helpers => ( defined $opt{'home_dir_for_helpers'} @@ -1920,7 +1911,7 @@ sub restart_handler { sub daemonize { # Pretty command line in ps - $0 = join (' ', $ORIG_ARG0, @ORIG_ARGV) unless @DEBUG; + $0 = join (' ', $ORIG_ARG0, @ORIG_ARGV) unless $Mail::SpamAssassin::DEBUG; # Be a nice daemon and chdir() to the root so we don't block any unmount attempts chdir '/' or die "Can't chdir to /: $!\n";
infrastructure at apache.org | ViewVC Help |
Powered by ViewVC 1.1.26 |