]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Added tag %Dw-n for LogFile parameter (replaced with the day number in week but diffe...
authoreldy <>
Fri, 18 Oct 2002 13:15:36 +0000 (13:15 +0000)
committereldy <>
Fri, 18 Oct 2002 13:15:36 +0000 (13:15 +0000)
docs/awstats.pdf
docs/awstats_changelog.txt
docs/awstats_config.html
wwwroot/cgi-bin/awstats.model.conf
wwwroot/cgi-bin/awstats.pl

index 1ee18ead39b31356a444300ede3a06ffc27d2342..30fe10508c0b8cf8ad254656d6921032e4aa2bc6 100644 (file)
Binary files a/docs/awstats.pdf and b/docs/awstats.pdf differ
index 23fe202bda0da3125af2dd1dce591c9eda37c684..3e37f6e2b76ac4f96e324e1e8fcb53f3723d4f69 100644 (file)
@@ -17,6 +17,8 @@ AWStats Changelog
 - New parameter: Added URLNotCaseSensitive.
 - New parameter: Added URLWithQueryWithoutFollowingParameters to exclude some
   parameters from URL when URLWithQuery is on.
+- Added tag %Dw-n for LogFile parameter (replaced with the day number in week
+  but differs from %DW-n because start with 0).
 - Fixed: -debug option is allowed in migrate.
 - Fixed: Wrong window was opened when clicking on flag link when
   UseFramesWhenCGI was on.
index 253a9ca6c93c258f867dccd93ea58fe6bfa51692..fdeae766c81396d6935390abd1d43a9745f37a29 100644 (file)
@@ -196,6 +196,7 @@ when reading it), follow the example:<br>
 4.0+ for tag %DW-n<br>\r
 4.1+ for tag %NS-n<br>\r
 5.0+ for tag %WY-n<br>\r
+5.1+ for tag %Dw-n<br>\r
 <br># "LogFile" contains the web server logfile to analyze.\r
 <br># You can use a full path or relative path from awstats.pl directory.\r
 <br># Example: "/var/log/apache/access.log"\r
@@ -213,6 +214,8 @@ when reading it), follow the example:<br>
 <br>#   %WY-n    is replaced with the week number in year (1-52)\r
 <br>#   %DW-n    is replaced with the day number in week (1-7, 1=sunday)\r
 <br>#                              use n=24 if you need (1-7, 1=monday)\r
+<br>#   %Dw-n    is replaced with the day number in week (0-6, 0=sunday)\r
+<br>#                              use n=24 if you need (0-6, 0=monday)\r
 <br>#   Use 0 for n if you need current year, month, day, hour...\r
 <br># Example: "/var/log/access_log.%YYYY-0%MM-0%DD-0.log"\r
 <br># Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log"\r
index 00a4a28124dfe0e9e7531ed9333a403bc5cb4c65..7e5e0af73660443aea0b050a6ab883aeb66b96d1 100644 (file)
@@ -33,6 +33,8 @@
 #   %WY-n    is replaced with the week number in year (1-52)
 #   %DW-n    is replaced with the day number in week (1-7, 1=sunday)
 #                              use n=24 if you need (1-7, 1=monday)
+#   %Dw-n    is replaced with the day number in week (0-6, 0=sunday)
+#                              use n=24 if you need (0-6, 0=monday)
 #   Use 0 for n if you need current year, month, day, hour...
 # Example: "/var/log/access_log.%YYYY-0%MM-0%DD-0.log"
 # Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log"
index 2830a45e90ff9e749dd16fe8678267c92725b8b8..4586cf4cb86ad8586065df345886071bd9dd13ff 100644 (file)
@@ -1411,14 +1411,15 @@ sub Check_Config {
                if ($oldersec < 10) { $oldersec = "0$oldersec"; }
                # Replace tag with new value
                if ($timetag =~ /YYYY/i) { $LogFile =~ s/%YYYY-$timephase/$olderyear/ig; next; }
-               if ($timetag =~ /YY/i)   { $LogFile =~ s/%YY-$timephase/$oldersmallyear/ig; next;  }
-               if ($timetag =~ /MM/i)   { $LogFile =~ s/%MM-$timephase/$oldermonth/ig; next;  }
-               if ($timetag =~ /DD/i)   { $LogFile =~ s/%DD-$timephase/$olderday/ig; next;  }
-               if ($timetag =~ /HH/i)   { $LogFile =~ s/%HH-$timephase/$olderhour/ig; next;  }
-               if ($timetag =~ /WM/i)   { $LogFile =~ s/%WM-$timephase/$olderweekofmonth/ig; next;  }
-               if ($timetag =~ /WY/i)   { $LogFile =~ s/%WY-$timephase/$olderweekofyear/ig; next;  }
-               if ($timetag =~ /DW/i)   { $LogFile =~ s/%DW-$timephase/$olderwday/ig; next;  }
-               if ($timetag =~ /NS/i)   { $LogFile =~ s/%NS-$timephase/$olderns/ig; next;  }
+               if ($timetag =~ /YY/i)   { $LogFile =~ s/%YY-$timephase/$oldersmallyear/ig; next; }
+               if ($timetag =~ /MM/i)   { $LogFile =~ s/%MM-$timephase/$oldermonth/ig; next; }
+               if ($timetag =~ /DD/i)   { $LogFile =~ s/%DD-$timephase/$olderday/ig; next; }
+               if ($timetag =~ /HH/i)   { $LogFile =~ s/%HH-$timephase/$olderhour/ig; next; }
+               if ($timetag =~ /NS/i)   { $LogFile =~ s/%NS-$timephase/$olderns/ig; next; }
+               if ($timetag =~ /WM/i)   { $LogFile =~ s/%WM-$timephase/$olderweekofmonth/ig; next; }
+               if ($timetag =~ /WY/i)   { $LogFile =~ s/%WY-$timephase/$olderweekofyear/ig; next; }
+               if ($timetag =~ /DW/)    { $LogFile =~ s/%DW-$timephase/$olderwday/g; next; }
+               if ($timetag =~ /Dw/)    { my $olderwday0=$olderwday-1; $LogFile =~ s/%Dw-$timephase/$olderwday0/g; next; }
                # If unknown tag
                error("Error: Unknown tag '\%$timetag' in LogFile parameter.");
        }
@@ -1428,10 +1429,11 @@ sub Check_Config {
        $LogFile =~ s/%MM/$nowmonth/ig;
        $LogFile =~ s/%DD/$nowday/ig;
        $LogFile =~ s/%HH/$nowhour/ig;
+       $LogFile =~ s/%NS/$nowns/ig;
        $LogFile =~ s/%WM/$nowweekofmonth/ig;
        $LogFile =~ s/%WY/$nowweekofyear/ig;
-       $LogFile =~ s/%DW/$nowwday/ig;
-       $LogFile =~ s/%NS/$nowns/ig;
+       $LogFile =~ s/%DW/$nowwday/g;
+       my $nowwday0=$nowwday-1; $LogFile =~ s/%Dw/$nowwday0/g;
        $LogFormat =~ s/\\//g;
        if ($Debug) {
                debug(" LogFile='$LogFile'",2);