diff options
author | Chuck Short <zul@gentoo.org> | 2004-06-14 02:28:39 +0000 |
---|---|---|
committer | Chuck Short <zul@gentoo.org> | 2004-06-14 02:28:39 +0000 |
commit | 842a76714cdb80940b95928b055895bbe3cf76fb (patch) | |
tree | 0b32334b77ed9ec51bd137e7188d735ba08a6e07 /net-www/apache/files/2.0.49 | |
parent | Moving to app-editors/gmanedit (diff) | |
download | gentoo-2-842a76714cdb80940b95928b055895bbe3cf76fb.tar.gz gentoo-2-842a76714cdb80940b95928b055895bbe3cf76fb.tar.bz2 gentoo-2-842a76714cdb80940b95928b055895bbe3cf76fb.zip |
Added patch from Phillip Gaschuetz. Closes #53350.
Diffstat (limited to 'net-www/apache/files/2.0.49')
-rw-r--r-- | net-www/apache/files/2.0.49/apache2splitlogfile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net-www/apache/files/2.0.49/apache2splitlogfile b/net-www/apache/files/2.0.49/apache2splitlogfile index 642fe5aced85..4112b6477260 100644 --- a/net-www/apache/files/2.0.49/apache2splitlogfile +++ b/net-www/apache/files/2.0.49/apache2splitlogfile @@ -68,6 +68,7 @@ ## log entry. It is slower, but it permits us to check for symlinks, and ## flush the buffers so everything is realtime and we don't lose any entry. + # # This script will take a combined Web server access # log file and break its contents into separate files. @@ -80,6 +81,8 @@ # will be appended to any existing log files. # +use POSIX qw(strftime); + while (<STDIN>) { # # Get the first token from the log record; it's the @@ -99,9 +102,8 @@ while (<STDIN>) { s/VLOG=(.*)[\/]*$//; $logs=$1; if($logs eq "") {$logs="/var/log/apache2";} - $date=`date +%Y-%m`; - chop $date; - $filename="$logs/VLOG-$date-${vhost}.log"; + $date=strftime("%Y-%m", localtime()); + $filename="${logs}/VLOG-${date}-${vhost}.log"; if (-l $filename) { die "File $filename is a symlink, writing too dangerous, dying!\n"; } |