Skip Menu |

This queue is for tickets about the Apache-LogRegex CPAN distribution.

Report information
The Basics
Id: 41084
Status: resolved
Priority: 0/
Queue: Apache-LogRegex

People
Owner: PETERHI [...] cpan.org
Requestors: phish [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.4
Fixed in: 1.4



Subject: Regular Expression fails with log files from Windows servers
Hi Peter, First of all, thanks for this nice little module. I stumbled upon a problem with the regular expressions when a *IX system processes log files coming from MS Windows servers. In these cases the generated regular expression will fail because the end of the line ($) is not directly following the last chunk. This is the classic \r\n thing in windows. Apache::LogRegex works again if the regular expression is defined as /^$regex\s*$/ Note, the trailing '\s*'. This will make the regular expression work more robust with files of different origin. A diff of the fix is attached. I marked this bug as critical because I use your module for some log file normalisation scripts. This script stopped working after I received log files from windows servers. Thanks and cheers Christian
Subject: LogRegex.pm.patch
--- LogRegex.pm 2008-11-20 08:40:31.000000000 +0100 +++ LogRegex.pm.patched 2008-11-20 08:42:14.000000000 +0100 @@ -64,7 +64,7 @@ } my $regex = join ( ' ', @regex_elements ); - $self->{_regex_string} = qr/^$regex$/; + $self->{_regex_string} = qr/^$regex\s*$/; } sub parse {
Thanks for the bug report and the patch. I have incorporated your patch into the code and version 1.5 has been uploaded to the cpan server and will be available shortly. Thank you again for your help.
New version (1.5) has been uploaded.