Changeset 91

Show
Ignore:
Timestamp:
07.12.2006 16:56:53 (2 years ago)
Author:
jorge
Message:

Changes: FuzzyOcr/Config?.pm removed focr_threshold_ from appearing twice in debug mode
Changes: FuzzyOcr?.pm FuzzyOcr/Misc?.pm: Made timing messages only appear in debug mode to reduce the messages logged, and make it behave more like every other plugin.

Files:

Legend:

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

    r90 r91  
    9191        $end = fuzzyocr_do( $self, $conf, $pms ); 
    9292    } 
    93     infolog("Processed in ". 
     93    debuglog("Processed in ". 
    9494        sprintf("%.6f",tv_interval($begin, [gettimeofday])) 
    9595        ." sec."); 
     
    267267 
    268268    if ($cnt == 0) { 
    269         infolog("Skipping OCR, no image files found..."); 
     269        debuglog("Skipping OCR, no image files found..."); 
    270270        removedirs(get_all_tmpdirs()) if (defined($imgdir) and ($conf->{focr_keep_bad_images}<2)); 
    271271        return 0; 
     
    675675        if ($internal_score + $current_score > $score) { 
    676676            my $total = $internal_score + $current_score; 
    677             infolog("OCR canceled, message got already more than $score points ($total) by other FuzzyOcr tests."); 
     677            warnlog("FuzzyOcr stopped, message got $internal_score points by other FuzzyOcr tests ($total>$score)." 
     678            #infolog("OCR canceled, message got already more than $score points ($total) by other FuzzyOcr tests."); 
    678679            return 0; 
    679680        } 
  • trunk/devel/FuzzyOcr/Config.pm

    r89 r91  
    574574        next if $k =~ m/^focr_bin_/; 
    575575        next if $k =~ m/^focr_mysql_pass/; 
     576        next if $k =~ m/^focr_threshold_/; 
    576577        debuglog(" $k => ".$conf->{$k}); 
    577578    } 
  • trunk/devel/FuzzyOcr/Misc.pm

    r88 r91  
    7979        } else { 
    8080            set_pid($pid); wait(); $retcode = $?; 
    81             infolog("Elapsed: ". 
     81            debuglog("Elapsed: ". 
    8282                sprintf ("%.6f",tv_interval($begin, [gettimeofday])) 
    8383                ." sec. ($pgm)($retcode)"); 
     
    118118            } else { 
    119119                set_pid($pid); wait(); $retcode = $?>>8; 
    120                 infolog("Elapsed: ". 
     120                debuglog("Elapsed: ". 
    121121                    sprintf ("%.6f",tv_interval($begin, [gettimeofday])) 
    122122                    ." sec. ($pgm)($retcode)"); 
     
    138138                infolog("Successfully killed PID $pid"); 
    139139            } elsif ($ret < 0) { 
    140                 infolog("No processes left... this shouldn't happen..."); 
     140                warnlog("No processes left... this shouldn't happen..."); 
    141141            } else { 
    142                 infolog("Failed to kill PID $pid, possibly stale process"); 
     142                warnlog("Failed to kill PID $pid, possibly stale process"); 
    143143            } 
    144144            return -1;