Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 33177 Details for
Bug 53350
usage of `date ` in apache2splitlogfile
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
replaced usage of date with strftime
patch (text/plain), 1.22 KB, created by
Philipp Gaschuetz
on 2004-06-13 09:03:27 UTC
(
hide
)
Description:
replaced usage of date with strftime
Filename:
MIME Type:
Creator:
Philipp Gaschuetz
Created:
2004-06-13 09:03:27 UTC
Size:
1.22 KB
patch
obsolete
>--- /usr/portage/net-www/apache/files/2.0.49/apache2splitlogfile 2004-03-22 22:17:57.000000000 +0100 >+++ apache2splitlogfile 2004-06-13 17:58:47.000000000 +0200 >@@ -68,6 +68,9 @@ > ## 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. > >+## Modified by Philipp Gaschuetz <pg@corpex.de>, replaced the usage of >+## `date +%Y-%m` with strftime - any system, which has the date command >+## would probably also have strftime support > # > # This script will take a combined Web server access > # log file and break its contents into separate files. >@@ -80,6 +83,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 +104,8 @@ > 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"; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 53350
: 33177