Fix SquidAnalyzer fails to update statistics after cleanup of access.log. Thanks to mkhallaf for the report.

This commit is contained in:
Darold Gilles 2015-10-12 13:26:01 +02:00
parent 300f820424
commit 90aed4a139
1 changed files with 7 additions and 0 deletions

View File

@ -658,6 +658,13 @@ sub parseFile
$logfile->close; $logfile->close;
# This file should be ommitted jump to the next file # This file should be ommitted jump to the next file
next if ($line eq 'NOK'); next if ($line eq 'NOK');
print STDERR "DEBUG: new file: $lfile, start from the beginning.\n" if (!$self->{QuietMode});
if (!$self->{is_squidguard_log}) {
$self->{end_offset} = 0;
} else {
$self->{sg_end_offset} = 0;
}
} else { } else {
# move at offset and see if next line is older than history time # move at offset and see if next line is older than history time
$logfile->seek($history_offset, 0); $logfile->seek($history_offset, 0);