You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2014/12/31 16:39:02 UTC
svn commit: r1648719 - in /httpd/httpd/trunk: CHANGES
support/split-logfile.in
Author: covener
Date: Wed Dec 31 15:39:02 2014
New Revision: 1648719
URL: http://svn.apache.org/r1648719
Log:
split-logfile: Fix perl error: 'Can't use string ("example.org:80")
as a symbol ref while "strict refs"'. PR 56329.
Submitted By: Holger Mauermann <mauermann gmail.com>
Committed By: covener
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/support/split-logfile.in
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1648719&r1=1648718&r2=1648719&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Dec 31 15:39:02 2014
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) split-logfile: Fix perl error: 'Can't use string ("example.org:80")
+ as a symbol ref while "strict refs"'. PR 56329.
+ [Holger Mauermann <mauermann gmail.com>]
+
*) mod_proxy: Prevent ProxyPassReverse from doing a substitution when
the URL parameter interpolates to an empty string. PR 56603.
[<ajprout hotmail.com>]
Modified: httpd/httpd/trunk/support/split-logfile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/split-logfile.in?rev=1648719&r1=1648718&r2=1648719&view=diff
==============================================================================
--- httpd/httpd/trunk/support/split-logfile.in (original)
+++ httpd/httpd/trunk/support/split-logfile.in Wed Dec 31 15:39:02 2014
@@ -29,7 +29,7 @@
use strict;
use warnings;
-my %is_open = ();
+my %log_file = ();
while (my $log_line = <STDIN>) {
#
@@ -54,10 +54,9 @@ while (my $log_line = <STDIN>) {
# If the log file for this virtual host isn't opened
# yet, do it now.
#
- if (! $is_open{$vhost}) {
- open $vhost, ">>${vhost}.log"
+ if (! $log_file{$vhost}) {
+ open $log_file{$vhost}, ">>${vhost}.log"
or die ("Can't open ${vhost}.log");
- $is_open{$vhost} = 1;
}
#
# Strip off the first token (which may be null in the
@@ -65,6 +64,6 @@ while (my $log_line = <STDIN>) {
# record to the current log file.
#
$log_line =~ s/^\S*\s+//;
- printf $vhost "%s", $log_line;
+ print {$log_file{$vhost}} $log_line;
}
exit 0;