Changeset 77

Show
Ignore:
Timestamp:
01.12.2006 22:43:37 (2 years ago)
Author:
jorge
Message:

Fixed Logging: now outputs all messages when either spamassassin/spamd is in debug mode.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/devel/FuzzyOcr/Logging.pm

    r75 r77  
    2626} 
    2727 
     28sub _not_debug { 
     29    return $Mail::SpamAssassin::Logger::LOG_SA{level} != 3; 
     30} 
    2831sub _log { 
    2932    my $conf = FuzzyOcr::Config::get_config(); 
     
    4346sub warnlog { 
    4447    my $conf = FuzzyOcr::Config::get_config(); 
    45     return if ($conf->{focr_verbose} < 1); 
     48    return if ($conf->{focr_verbose} < 1 and _not_debug()); 
    4649    _log("warn",$_[0]) if $conf->{focr_log_stderr}; 
    4750    if (defined $conf->{focr_logfile}) { 
     
    5255sub infolog { 
    5356    my $conf = FuzzyOcr::Config::get_config(); 
    54     return if ($conf->{focr_verbose} < 2); 
     57    return if ($conf->{focr_verbose} < 2 and _not_debug()); 
    5558    _log("info",$_[0]) if $conf->{focr_log_stderr}; 
    5659    if (defined $conf->{focr_logfile}) { 
     
    6164sub debuglog { 
    6265    my $conf = FuzzyOcr::Config::get_config(); 
    63     return if ($conf->{focr_verbose} < 3); 
     66    return if ($conf->{focr_verbose} < 3 and _not_debug()); 
    6467    _log("dbg",$_[0]) if $conf->{focr_log_stderr}; 
    6568    if (defined $conf->{focr_logfile}) {