mailscanner converter - syntax errors

Mikael Kermorgant mikael.kermorgant at paris.iufm.fr
Tue Sep 20 10:39:29 CEST 2005


Hi,

I've tried the MailScanner converter Wytze van der Raay submitted on the 
  lists some time ago :

http://www.logreport.org/contact/lists/questions/msg00437.php

I run Debian sarge and Lire 2.2.0.1 (perl 5.8.4) and I get this problem :
-----------------------------------------------------------------------
~/.lire/converters$ lr_log2report  --help dlf-converters
lr_log2report: WARNING Subroutine new redefined at (eval 156) line 29.
lr_log2report: WARNING Bareword found where operator expected at (eval 
156) line 148, near ")_"
lr_log2report: WARNING  (Missing operator before _?)
lr_log2report: WARNING Bareword found where operator expected at (eval 
156) line 168, near ")_"
lr_log2report: WARNING  (Missing operator before _?)
lr_log2report: WARNING Bareword found where operator expected at (eval 
156) line 178, near "$(a"
lr_log2report: WARNING  (Missing operator before a?)
lr_log2report: WARNING Bareword found where operator expected at (eval 
156) line 179, near "$(a"
lr_log2report: WARNING  (Missing operator before a?)
lr_log2report: WARNING error while running initializer in 
'/var/lib/lire/.lire/converters/MailScannerConverter.pm': syntax error 
at (eval 156) line 148, near ")_"
syntax error at (eval 156) line 168, near ")_"
syntax error at (eval 156) line 178, near "$(a"
syntax error at (eval 156) line 181, near "} elsif"
-----------------------------------------------------------------------

Here's an extract from ~/.lire/converters/MailScannerConverter.pm :

-----------------------------------------------------------------------
147 sub init_dlf_converter {
     148     my ( $self, $process ) = (a)_;
     149
     150     return;
     151 }
     152
     153 =pod
     154
     155 =head2 process_log_file( $process, $fd )
     156
     157 This method is called so that the converter can converter the data
     158 contained in the $fd file handle to DLF. This method is only 
used when
     159 the handle_log_lines() method returned false.
     160
     161 $process contains a reference to the Lire::DlfConverterProcess 
object
     162 which controls the conversion process and defines the API to 
write DLF
     163 and report errors.
     164
     165 =cut
     166
     167 sub process_log_file {
     168     my ( $self, $process, $fh ) = (a)_;
     169
     170     my %data = ();
     171     my $id = 1;
     172     my $line;
     173
     174     while ( defined( $line = <$fh> ) ) {
     175         chomp $line;
     176
     177         my $rec = eval { $self->{syslog_parser}->parse( $line ) };
     178         if ( $(a) ) {
     179             $process->error ($(a), $line );
     180             next;
     181         } elsif ($rec->{process} ne 'MailScanner' ) {
     182 ##          $process->ignore_log_line( $line, "not a 
MailScanner record""
          );
     183             next;

-----------------------------------------------------------------------

Would somebody have an idea about what's wrong ?
Or is this converter available somewhere else ?

Thanks in advance,

Mikael Kermorgant

-- 
To UNSUBSCRIBE, email to questions-request at logreport.org with a subject of 
"unsubscribe". Trouble? Send an email with subject "help" to 
questions-request at logreport.org



More information about the Questions mailing list