From: Manni H. <man...@us...> - 2007-12-01 22:24:17
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9330/Classifier Modified Files: Bayes.pm Log Message: Log at least some of the things that we are doing. Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.354 retrieving revision 1.355 diff -C2 -d -r1.354 -r1.355 *** Bayes.pm 27 Nov 2007 14:44:56 -0000 1.354 --- Bayes.pm 1 Dec 2007 22:24:20 -0000 1.355 *************** *** 222,226 **** $self->config_( 'hostname', $self->{hostname__} ); ! # This parameter is used when the UI is operating in Stealth Mode. # If left blank (the default setting) the X-POPFile-Link will use 127.0.0.1 --- 222,226 ---- $self->config_( 'hostname', $self->{hostname__} ); ! # This parameter is used when the UI is operating in Stealth Mode. # If left blank (the default setting) the X-POPFile-Link will use 127.0.0.1 *************** *** 329,338 **** # Windows and using the fork. ! if ( ( $nihongo_parser eq 'kakasi' ) && ( $^O eq 'MSWin32' ) && ! ( ( ( $self->user_module_config_( 1, 'pop3', 'enabled' ) ) && ! ( $self->user_module_config_( 1, 'pop3', 'force_fork' ) ) ) || ! ( ( $self->user_module_config_( 1, 'nntp', 'enabled' ) ) && ! ( $self->user_module_config_( 1, 'nntp', 'force_fork' ) ) ) || ! ( ( $self->user_module_config_( 1, 'smtp', 'enabled' ) ) && ( $self->user_module_config_( 1, 'smtp', 'force_fork' ) ) ) ) ) { --- 329,338 ---- # Windows and using the fork. ! if ( ( $nihongo_parser eq 'kakasi' ) && ( $^O eq 'MSWin32' ) && ! ( ( ( $self->user_module_config_( 1, 'pop3', 'enabled' ) ) && ! ( $self->user_module_config_( 1, 'pop3', 'force_fork' ) ) ) || ! ( ( $self->user_module_config_( 1, 'nntp', 'enabled' ) ) && ! ( $self->user_module_config_( 1, 'nntp', 'force_fork' ) ) ) || ! ( ( $self->user_module_config_( 1, 'smtp', 'enabled' ) ) && ( $self->user_module_config_( 1, 'smtp', 'force_fork' ) ) ) ) ) { *************** *** 1504,1508 **** my $random = Crypt::Random::makerandom_octet( Length => 128, ! Strength => 1 ); my $now = time; return sha256_hex( "$$" . "$random$now" ); --- 1504,1508 ---- my $random = Crypt::Random::makerandom_octet( Length => 128, ! Strength => 0 ); my $now = time; return sha256_hex( "$$" . "$random$now" ); *************** *** 1814,1817 **** --- 1814,1818 ---- { my ( $self, $session, $file, $templ, $matrix, $idmap ) = @_; + $self->log_( 1, "Starting classify" ); my $msg_total = 0; *************** *** 1837,1840 **** --- 1838,1842 ---- for my $type ($self->get_magnet_types_in_bucket( $session, $bucket )) { if ( $self->magnet_match__( $session, $self->{parser__}->get_header($type), $bucket, $type ) ) { + $self->log_( 1, "Matched message to magnet. Bucket is $bucket." ); return $bucket; } *************** *** 2298,2301 **** --- 2300,2304 ---- } } + $self->log_( 1, "Leaving classify. Class is $class." ); return $class; *************** *** 2333,2336 **** --- 2336,2341 ---- my ( $self, $session, $mail, $client, $nosave, $class, $slot, $echo, $crlf ) = @_; + $self->log_( 1, "Starting classify_and_modify" ); + $echo = 1 unless (defined $echo); $crlf = $eol unless (defined $crlf); *************** *** 2387,2390 **** --- 2392,2396 ---- open MSG, ">$msg_file" unless $nosave; + $self->log_( 1, "Reading mail message." ); while ( my $line = $self->slurp_( $mail ) ) { my $fileline; *************** *** 2709,2712 **** --- 2715,2719 ---- } } + $self->log_( 1, "classify_and_modify done. Classification is $classification" ); return ( $classification, $slot, $self->{magnet_used__} ); *************** *** 3769,3772 **** --- 3776,3780 ---- my $default = 0; + $self->{db_get_user_parameter_default__}->execute( $utid ); my $result = $self->{db_get_user_parameter_default__}->fetchrow_arrayref; |