[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Apache LogRegex


Hello,

I do not get any LOGFORMAT seems to be supported with
Apache::LogRegex->new() constrcutor. Because I do not get any positive
result for the following code.

======================================
use Apache::LogRegex;

$log_format = "%h %l %u \[%t\] \"%r\" %>s %b \"%{Referer}i\"
\"%{User-agent}i\"" ;

my $lr;

eval { $lr = Apache::LogRegex->new($log_format) };
die "Unable to parse log line: $@" if ($@);

my %data;

open ( F, "<$ARGV[0]" ) || die("Unable to open input file. $ARGV[0]");
  while ( my $line_from_logfile = <F> ) {
      eval { %data = $lr->parse($line_from_logfile); };
      if (%data) {
       print "parsed successfully\n";
      } else {
       print "parsing failed\n";
      }
  }
 close(F);
=======================================
I get only "parsing failed" message.  I had checked with the following
log format too.  And I have to tell you that my website's log format
is "combined" log format.

$log_format  = "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"";


I request someone help here.  And I thank you for that too.

Greetings,
R.Kumaran


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.