]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Better management of corrupted log files.
authoreldy <>
Sat, 6 Jan 2001 15:08:16 +0000 (15:08 +0000)
committereldy <>
Sat, 6 Jan 2001 15:08:16 +0000 (15:08 +0000)
awstats.pl

index 93ba16bb026e3496f1eff41a304f648a70b94d6e..09864f7fcabaf103111efad13aa2095ce4904fdc 100644 (file)
@@ -1688,10 +1688,10 @@ if (($YearRequired == $nowyear) && ($MonthRequired eq "year" || $MonthRequired =
                $line=$_;
                $_ =~ s/\n//;   # Needed because IIS log file end with CRLF and perl read lines until LF
                $_ =~ s/\" / /g; $_ =~ s/ \"/ /g; $_ =~ s/\"$//;        # Suppress "
+               if (/^$/) { next; }                                                             # ISS sometimes write blank lines, also possible with Apache log when editing log file.
                if ($LogFormat == 2) {
                        if (/^#/) { next; }                                                     # ISS writes such comments, we forget line
                        @felter=split(/ /,$_);
-                       if ($felter[1] eq "")    { next; }                      # ISS sometimes write blank lines
                        $savetime=$felter[1];
                        @datep=split(/-/,$felter[0]);                           # YYYY-MM-DD
                        # Change order of ISS parameters to be like Apache