From: Ken Coar Date: Fri, 17 Apr 2015 03:10:18 +0000 (+0000) Subject: Quote log-sink arguments for {Custom,Error,Transfer}Log directive. X-Git-Tag: 2.5.0-alpha~3264 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b246876659989d5840efc9bf63116d9f5b2625e;p=apache Quote log-sink arguments for {Custom,Error,Transfer}Log directive. Except syslog and journal, which are keywords. There's no harm in quoting those, but no real point to it, either. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1674195 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/env.html.en b/docs/manual/env.html.en index 659cdb52dc..6f424c763b 100644 --- a/docs/manual/env.html.en +++ b/docs/manual/env.html.en @@ -468,7 +468,7 @@ BrowserMatch "JDK/1\.0" force-response-1.0
SetEnvIf Request_URI \.gif image-request
 SetEnvIf Request_URI \.jpg image-request
 SetEnvIf Request_URI \.png image-request
-CustomLog logs/access_log common env=!image-request
+CustomLog "logs/access_log" common env=!image-request diff --git a/docs/manual/env.xml b/docs/manual/env.xml index 3cda1acc64..db8c204c7c 100644 --- a/docs/manual/env.xml +++ b/docs/manual/env.xml @@ -509,7 +509,7 @@ BrowserMatch "JDK/1\.0" force-response-1.0 SetEnvIf Request_URI \.gif image-request SetEnvIf Request_URI \.jpg image-request SetEnvIf Request_URI \.png image-request -CustomLog logs/access_log common env=!image-request +CustomLog "logs/access_log" common env=!image-request diff --git a/docs/manual/logs.html.en b/docs/manual/logs.html.en index 4c4c58dd73..21b6e2413f 100644 --- a/docs/manual/logs.html.en +++ b/docs/manual/logs.html.en @@ -218,7 +218,7 @@ follows.

LogFormat "%h %l %u %t \"%r\" %>s %b" common
-CustomLog logs/access_log common
+CustomLog "logs/access_log" common

This defines the nickname common and @@ -359,7 +359,7 @@ CustomLog logs/access_log common Log Format. It can be used as follows.

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
-CustomLog log/access_log combined
+CustomLog "log/access_log" combined

This format is exactly the same as the Common Log Format, @@ -409,9 +409,9 @@ CustomLog log/access_log combined to mimic the effects of the ReferLog and AgentLog directives.

LogFormat "%h %l %u %t \"%r\" %>s %b" common
-CustomLog logs/access_log common
-CustomLog logs/referer_log "%{Referer}i -> %U"
-CustomLog logs/agent_log "%{User-agent}i"
+CustomLog "logs/access_log" common +CustomLog "logs/referer_log" "%{Referer}i -> %U" +CustomLog "logs/agent_log" "%{User-agent}i"

This example also shows that it is not necessary to define a @@ -437,16 +437,16 @@ SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog # Mark requests for the robots.txt file SetEnvIf Request_URI "^/robots\.txt$" dontlog # Log what remains -CustomLog logs/access_log common env=!dontlog +CustomLog "logs/access_log" common env=!dontlog

As another example, consider logging requests from english-speakers to one log file, and non-english speakers to a different log file.

-
        SetEnvIf Accept-Language "en" english
- CustomLog logs/english_log common env=english
- CustomLog logs/non_english_log common env=!english
+
SetEnvIf Accept-Language "en" english
+CustomLog "logs/english_log" common env=english
+CustomLog "logs/non_english_log" common env=!english

In a caching scenario one would want to know about @@ -455,7 +455,7 @@ CustomLog logs/access_log common env=!dontlog

SetEnv CACHE_MISS 1
 LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
-CustomLog logs/access_log common-cache
+CustomLog "logs/access_log" common-cache

mod_cache will run before @@ -621,7 +621,7 @@ CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" commo consider the following directives.

LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
-CustomLog logs/access_log comonvhost
+CustomLog "logs/access_log" comonvhost

The %v is used to log the name of the virtual diff --git a/docs/manual/logs.xml b/docs/manual/logs.xml index da135778b3..3552837253 100644 --- a/docs/manual/logs.xml +++ b/docs/manual/logs.xml @@ -237,7 +237,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b" common -CustomLog logs/access_log common +CustomLog "logs/access_log" common

This defines the nickname common and @@ -383,7 +383,7 @@ CustomLog logs/access_log common LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined -CustomLog log/access_log combined +CustomLog "log/access_log" combined

This format is exactly the same as the Common Log Format, @@ -436,9 +436,9 @@ CustomLog log/access_log combined LogFormat "%h %l %u %t \"%r\" %>s %b" common -CustomLog logs/access_log common -CustomLog logs/referer_log "%{Referer}i -> %U" -CustomLog logs/agent_log "%{User-agent}i" +CustomLog "logs/access_log" common +CustomLog "logs/referer_log" "%{Referer}i -> %U" +CustomLog "logs/agent_log" "%{User-agent}i"

This example also shows that it is not necessary to define a @@ -469,7 +469,7 @@ SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog # Mark requests for the robots.txt file SetEnvIf Request_URI "^/robots\.txt$" dontlog # Log what remains -CustomLog logs/access_log common env=!dontlog +CustomLog "logs/access_log" common env=!dontlog

As another example, consider logging requests from @@ -477,9 +477,9 @@ CustomLog logs/access_log common env=!dontlog different log file.

- SetEnvIf Accept-Language "en" english
- CustomLog logs/english_log common env=english
- CustomLog logs/non_english_log common env=!english +SetEnvIf Accept-Language "en" english
+CustomLog "logs/english_log" common env=english
+CustomLog "logs/non_english_log" common env=!english

In a caching scenario one would want to know about @@ -489,7 +489,7 @@ CustomLog logs/access_log common env=!dontlog SetEnv CACHE_MISS 1 LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache -CustomLog logs/access_log common-cache +CustomLog "logs/access_log" common-cache

mod_cache will run before @@ -586,7 +586,7 @@ LogFormat "%!200,304,302{Referer}i" refererlog can use:

- CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common +CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common

Notice that quotes are used to enclose the entire command @@ -664,7 +664,7 @@ CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" commo LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost -CustomLog logs/access_log comonvhost +CustomLog "logs/access_log" comonvhost

The %v is used to log the name of the virtual diff --git a/docs/manual/misc/perf-scaling.html.en b/docs/manual/misc/perf-scaling.html.en index b855f8ce74..dcb35bc51e 100644 --- a/docs/manual/misc/perf-scaling.html.en +++ b/docs/manual/misc/perf-scaling.html.en @@ -620,8 +620,8 @@ Swap: 3903784 12540 3891244 a pipe character (|). For instance:

-

CustomLog "|/usr/local/apache2/bin/rotatelogs - /var/log/access_log 86400" common +

+CustomLog "|/usr/local/apache2/bin/rotatelogs /var/log/access_log 86400" common

The program on the other end of the pipe will receive the @@ -1295,9 +1295,9 @@ Swap: 3903784 12540 3891244

</Directory> RewriteLog "/home/sctemme/inst/blog/httpd/logs/rewrite_log" RewriteLogLevel 9 - ErrorLog /home/sctemme/inst/blog/httpd/logs/error_log + ErrorLog "/home/sctemme/inst/blog/httpd/logs/error_log" LogLevel debug - CustomLog /home/sctemme/inst/blog/httpd/logs/access_log common + CustomLog "/home/sctemme/inst/blog/httpd/logs/access_log" common ScriptAlias "/cgi-bin/" "/home/sctemme/inst/blog/bin/" <Directory "/home/sctemme/inst/blog/bin"> Options +ExecCGI diff --git a/docs/manual/misc/perf-scaling.xml b/docs/manual/misc/perf-scaling.xml index 701b8321bb..08792d3522 100644 --- a/docs/manual/misc/perf-scaling.xml +++ b/docs/manual/misc/perf-scaling.xml @@ -619,8 +619,8 @@ Swap: 3903784 12540 3891244 a pipe character (|). For instance:

- CustomLog "|/usr/local/apache2/bin/rotatelogs - /var/log/access_log 86400" common + +CustomLog "|/usr/local/apache2/bin/rotatelogs /var/log/access_log 86400" common

The program on the other end of the pipe will receive the @@ -1294,9 +1294,9 @@ Listen *:8001 </Directory> RewriteLog "/home/sctemme/inst/blog/httpd/logs/rewrite_log" RewriteLogLevel 9 - ErrorLog /home/sctemme/inst/blog/httpd/logs/error_log + ErrorLog "/home/sctemme/inst/blog/httpd/logs/error_log" LogLevel debug - CustomLog /home/sctemme/inst/blog/httpd/logs/access_log common + CustomLog "/home/sctemme/inst/blog/httpd/logs/access_log" common ScriptAlias "/cgi-bin/" "/home/sctemme/inst/blog/bin/" <Directory "/home/sctemme/inst/blog/bin"> Options +ExecCGI diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en index 7ff7cc614c..2efebcf463 100644 --- a/docs/manual/mod/core.html.en +++ b/docs/manual/mod/core.html.en @@ -4540,8 +4540,8 @@ hostname or IP address ServerAdmin webmaster@host.example.com DocumentRoot "/www/docs/host.example.com" ServerName host.example.com - ErrorLog logs/host.example.com-error_log - TransferLog logs/host.example.com-access_log + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" </VirtualHost> @@ -4554,8 +4554,8 @@ hostname or IP address ServerAdmin webmaster@host.example.com DocumentRoot "/www/docs/host.example.com" ServerName host.example.com - ErrorLog logs/host.example.com-error_log - TransferLog logs/host.example.com-access_log + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" </VirtualHost> diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index f8fd4933c2..da9be22cb2 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -4553,8 +4553,8 @@ hostname or IP address ServerAdmin webmaster@host.example.com DocumentRoot "/www/docs/host.example.com" ServerName host.example.com - ErrorLog logs/host.example.com-error_log - TransferLog logs/host.example.com-access_log + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" </VirtualHost> @@ -4568,8 +4568,8 @@ hostname or IP address ServerAdmin webmaster@host.example.com DocumentRoot "/www/docs/host.example.com" ServerName host.example.com - ErrorLog logs/host.example.com-error_log - TransferLog logs/host.example.com-access_log + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" </VirtualHost> diff --git a/docs/manual/mod/mod_cache.html.en b/docs/manual/mod/mod_cache.html.en index 71a1122396..c67690eaf4 100644 --- a/docs/manual/mod/mod_cache.html.en +++ b/docs/manual/mod/mod_cache.html.en @@ -337,10 +337,10 @@ AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html

This makes it possible to support conditional logging of cached requests as per the following example:

-
CustomLog cached-requests.log common env=cache-hit
-CustomLog uncached-requests.log common env=cache-miss
-CustomLog revalidated-requests.log common env=cache-revalidate
-CustomLog invalidated-requests.log common env=cache-invalidate
+
CustomLog "cached-requests.log" common env=cache-hit
+CustomLog "uncached-requests.log" common env=cache-miss
+CustomLog "revalidated-requests.log" common env=cache-revalidate
+CustomLog "invalidated-requests.log" common env=cache-invalidate

For module authors, a hook called cache_status is available, diff --git a/docs/manual/mod/mod_cache.xml b/docs/manual/mod/mod_cache.xml index 8afde7fc0d..4f68feca86 100644 --- a/docs/manual/mod/mod_cache.xml +++ b/docs/manual/mod/mod_cache.xml @@ -327,10 +327,10 @@ AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html as per the following example:

-CustomLog cached-requests.log common env=cache-hit -CustomLog uncached-requests.log common env=cache-miss -CustomLog revalidated-requests.log common env=cache-revalidate -CustomLog invalidated-requests.log common env=cache-invalidate +CustomLog "cached-requests.log" common env=cache-hit +CustomLog "uncached-requests.log" common env=cache-miss +CustomLog "revalidated-requests.log" common env=cache-revalidate +CustomLog "invalidated-requests.log" common env=cache-invalidate

For module authors, a hook called cache_status is available, diff --git a/docs/manual/mod/mod_deflate.html.en b/docs/manual/mod/mod_deflate.html.en index 6a1b064b12..eea05440dd 100644 --- a/docs/manual/mod/mod_deflate.html.en +++ b/docs/manual/mod/mod_deflate.html.en @@ -310,7 +310,7 @@ content

Example

      DeflateFilterNote ratio
 
       LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
-      CustomLog logs/deflate_log deflate
+ CustomLog "logs/deflate_log" deflate

If you want to extract more accurate values from your logs, you @@ -337,7 +337,7 @@ DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate -CustomLog logs/deflate_log deflate +CustomLog "logs/deflate_log" deflate

See also

diff --git a/docs/manual/mod/mod_deflate.xml b/docs/manual/mod/mod_deflate.xml index 49749bac6e..37fc18e956 100644 --- a/docs/manual/mod/mod_deflate.xml +++ b/docs/manual/mod/mod_deflate.xml @@ -240,7 +240,7 @@ content DeflateFilterNote ratio LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate - CustomLog logs/deflate_log deflate + CustomLog "logs/deflate_log" deflate
@@ -270,7 +270,7 @@ DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate -CustomLog logs/deflate_log deflate +CustomLog "logs/deflate_log" deflate diff --git a/docs/manual/mod/mod_log_config.html.en b/docs/manual/mod/mod_log_config.html.en index 333c3b49e8..7f5765882b 100644 --- a/docs/manual/mod/mod_log_config.html.en +++ b/docs/manual/mod/mod_log_config.html.en @@ -433,10 +433,10 @@ expr=expression]
# CustomLog with format nickname
 LogFormat "%h %l %u %t \"%r\" %>s %b" common
-CustomLog logs/access_log common
+CustomLog "logs/access_log" common
 
 # CustomLog with explicit format string
-CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"
+CustomLog "logs/access_log" "%h %l %u %t \"%r\" %>s %b"

The third argument is optional and controls whether or @@ -456,15 +456,15 @@ CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" log, you can use:

SetEnvIf Request_URI \.gif$ gif-image
-CustomLog gif-requests.log common env=gif-image
-CustomLog nongif-requests.log common env=!gif-image
+CustomLog "gif-requests.log" common env=gif-image +CustomLog "nongif-requests.log" common env=!gif-image

Or, to reproduce the behavior of the old RefererIgnore directive, you might use the following:

SetEnvIf Referer example\.com localreferer
-CustomLog referer.log referer env=!localreferer
+CustomLog "referer.log" referer env=!localreferer @@ -532,7 +532,7 @@ CustomLog referer.log referer env=!localreferer other format has been specified.

Example

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
-TransferLog logs/access_log
+TransferLog "logs/access_log"
diff --git a/docs/manual/mod/mod_log_config.xml b/docs/manual/mod/mod_log_config.xml index ea097a6c4c..f40fb0b68c 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -471,10 +471,10 @@ expr=expression] # CustomLog with format nickname LogFormat "%h %l %u %t \"%r\" %>s %b" common -CustomLog logs/access_log common +CustomLog "logs/access_log" common # CustomLog with explicit format string -CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" +CustomLog "logs/access_log" "%h %l %u %t \"%r\" %>s %b"

The third argument is optional and controls whether or @@ -496,8 +496,8 @@ CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" SetEnvIf Request_URI \.gif$ gif-image -CustomLog gif-requests.log common env=gif-image -CustomLog nongif-requests.log common env=!gif-image +CustomLog "gif-requests.log" common env=gif-image +CustomLog "nongif-requests.log" common env=!gif-image

Or, to reproduce the behavior of the old RefererIgnore @@ -505,7 +505,7 @@ CustomLog nongif-requests.log common env=!gif-image SetEnvIf Referer example\.com localreferer -CustomLog referer.log referer env=!localreferer +CustomLog "referer.log" referer env=!localreferer @@ -578,7 +578,7 @@ CustomLog referer.log referer env=!localreferer Example LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" -TransferLog logs/access_log +TransferLog "logs/access_log" diff --git a/docs/manual/mod/mod_macro.html.en b/docs/manual/mod/mod_macro.html.en index e184ba4e87..beb892ba5e 100644 --- a/docs/manual/mod/mod_macro.html.en +++ b/docs/manual/mod/mod_macro.html.en @@ -70,8 +70,8 @@ multiple similar virtual hosts:

ServerAlias www.$domain DocumentRoot "/var/www/vhosts/$name" - ErrorLog /var/log/httpd/$name.error_log - CustomLog /var/log/httpd/$name.access_log combined + ErrorLog "/var/log/httpd/$name.error_log" + CustomLog "/var/log/httpd/$name.access_log" combined </VirtualHost> </Macro> diff --git a/docs/manual/mod/mod_macro.xml b/docs/manual/mod/mod_macro.xml index 471b7c1d4f..a555e4af9f 100644 --- a/docs/manual/mod/mod_macro.xml +++ b/docs/manual/mod/mod_macro.xml @@ -56,8 +56,8 @@ multiple similar virtual hosts:

ServerAlias www.$domain DocumentRoot "/var/www/vhosts/$name" - ErrorLog /var/log/httpd/$name.error_log - CustomLog /var/log/httpd/$name.access_log combined + ErrorLog "/var/log/httpd/$name.error_log" + CustomLog "/var/log/httpd/$name.access_log" combined </VirtualHost> </Macro> diff --git a/docs/manual/mod/mod_ssl.html.en b/docs/manual/mod/mod_ssl.html.en index 7c2e8bd8ce..8f454e7756 100644 --- a/docs/manual/mod/mod_ssl.html.en +++ b/docs/manual/mod/mod_ssl.html.en @@ -254,7 +254,7 @@ you find in the above table.

For backward compatibility there is additionally a special ``%{name}c'' cryptography format function provided. Information about this function is provided in the Compatibility chapter.

-

Example

CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
+

Example

CustomLog "logs/ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
top
diff --git a/docs/manual/mod/mod_ssl.xml b/docs/manual/mod/mod_ssl.xml index 1ebf1cbad6..82d0517aca 100644 --- a/docs/manual/mod/mod_ssl.xml +++ b/docs/manual/mod/mod_ssl.xml @@ -178,7 +178,7 @@ provided. Information about this function is provided in the Compatibility chapter.

Example -CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" +CustomLog "logs/ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" diff --git a/docs/manual/mod/mod_usertrack.html.en b/docs/manual/mod/mod_usertrack.html.en index a3a258a6cd..ae38304047 100644 --- a/docs/manual/mod/mod_usertrack.html.en +++ b/docs/manual/mod/mod_usertrack.html.en @@ -58,7 +58,7 @@ via mod_log_config configurable logging formats:

LogFormat "%{Apache}n %r %t" usertrack
-CustomLog logs/clickstream.log usertrack
+CustomLog "logs/clickstream.log" usertrack
diff --git a/docs/manual/mod/mod_usertrack.xml b/docs/manual/mod/mod_usertrack.xml index acaf6b3be8..c85294c838 100644 --- a/docs/manual/mod/mod_usertrack.xml +++ b/docs/manual/mod/mod_usertrack.xml @@ -43,7 +43,7 @@ LogFormat "%{Apache}n %r %t" usertrack -CustomLog logs/clickstream.log usertrack +CustomLog "logs/clickstream.log" usertrack diff --git a/docs/manual/programs/split-logfile.html.en b/docs/manual/programs/split-logfile.html.en index 57dc5cc5cb..6635623a21 100644 --- a/docs/manual/programs/split-logfile.html.en +++ b/docs/manual/programs/split-logfile.html.en @@ -37,7 +37,7 @@

Create a log file with virtual host information in it:

LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_plus_vhost
-CustomLog logs/access_log combined_plus_vhost
+CustomLog "logs/access_log" combined_plus_vhost

Log files will be created, in the directory where you run the diff --git a/docs/manual/programs/split-logfile.xml b/docs/manual/programs/split-logfile.xml index 63f8f8a43e..2e44c51b67 100644 --- a/docs/manual/programs/split-logfile.xml +++ b/docs/manual/programs/split-logfile.xml @@ -39,7 +39,7 @@ LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_plus_vhost -CustomLog logs/access_log combined_plus_vhost +CustomLog "logs/access_log" combined_plus_vhost

Log files will be created, in the directory where you run the diff --git a/docs/manual/rewrite/flags.html.en b/docs/manual/rewrite/flags.html.en index e0f65fc9d5..d1090ffcd2 100644 --- a/docs/manual/rewrite/flags.html.en +++ b/docs/manual/rewrite/flags.html.en @@ -273,7 +273,7 @@ environment variable is used to exclude those requests from the access log.

RewriteRule "\.(png|gif|jpg)$"   "-" [E=image:1]
-CustomLog   logs/access_log      combined env=!image
+CustomLog "logs/access_log" combined env=!image

Note that this same effect can be obtained using SetEnvIf. This technique is offered as diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index b3bccb2584..58eaae5e00 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -268,7 +268,7 @@ log.

RewriteRule "\.(png|gif|jpg)$" "-" [E=image:1] -CustomLog logs/access_log combined env=!image +CustomLog "logs/access_log" combined env=!image

Note that this same effect can be obtained using %v variable. Add this to the beginning of your log format string:

LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost
-CustomLog logs/multiple_vhost_log vhost
+CustomLog "logs/multiple_vhost_log" vhost

This will create a log file in the common log format, but with the diff --git a/docs/manual/vhosts/fd-limits.xml b/docs/manual/vhosts/fd-limits.xml index 56c78c24b7..01091ee2ec 100644 --- a/docs/manual/vhosts/fd-limits.xml +++ b/docs/manual/vhosts/fd-limits.xml @@ -93,7 +93,7 @@ of your log format string:

LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost -CustomLog logs/multiple_vhost_log vhost +CustomLog "logs/multiple_vhost_log" vhost

This will create a log file in the common log format, but with the diff --git a/docs/manual/vhosts/mass.html.en b/docs/manual/vhosts/mass.html.en index 1b98c65211..d021778b1d 100644 --- a/docs/manual/vhosts/mass.html.en +++ b/docs/manual/vhosts/mass.html.en @@ -163,7 +163,7 @@ UseCanonicalName Off # this log format can be split per-virtual-host based on the first field # using the split-logfile utility. LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon -CustomLog logs/access_log vcommon +CustomLog "logs/access_log" vcommon # include the server name in the filenames used to satisfy requests VirtualDocumentRoot "/www/hosts/%0/docs" @@ -196,7 +196,7 @@ examples.

UseCanonicalName Off
 
 LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
-CustomLog logs/access_log vcommon
+CustomLog "logs/access_log" vcommon
 
 # include part of the server name in the filenames
 VirtualDocumentRoot "/home/%2/www"
@@ -240,7 +240,7 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
 <VirtualHost 111.22.33.44>
     ServerName www.commercial.example.com
 
-    CustomLog logs/access_log.commercial vcommon
+    CustomLog "logs/access_log.commercial" vcommon
 
     VirtualDocumentRoot "/www/commercial/%0/docs"
     VirtualScriptAlias  "/www/commercial/%0/cgi-bin"
@@ -249,7 +249,7 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
 <VirtualHost 111.22.33.45>
     ServerName www.homepages.example.com
 
-    CustomLog logs/access_log.homepages vcommon
+    CustomLog "logs/access_log.homepages" vcommon
 
     VirtualDocumentRoot "/www/homepages/%0/docs"
     ScriptAlias         "/cgi-bin/" "/www/std-cgi/"
@@ -284,7 +284,7 @@ UseCanonicalName DNS
 
 # include the IP address in the logs so they may be split
 LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
-CustomLog logs/access_log vcommon
+CustomLog "logs/access_log" vcommon
 
 # include the IP address in the filenames
 VirtualDocumentRootIP "/www/hosts/%0/docs"
diff --git a/docs/manual/vhosts/mass.xml b/docs/manual/vhosts/mass.xml
index ea52263c2f..3c7c7db048 100644
--- a/docs/manual/vhosts/mass.xml
+++ b/docs/manual/vhosts/mass.xml
@@ -154,7 +154,7 @@ UseCanonicalName Off
 # this log format can be split per-virtual-host based on the first field
 # using the split-logfile utility.
 LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
-CustomLog logs/access_log vcommon
+CustomLog "logs/access_log" vcommon
 
 # include the server name in the filenames used to satisfy requests
 VirtualDocumentRoot "/www/hosts/%0/docs"
@@ -188,7 +188,7 @@ examples.

UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon -CustomLog logs/access_log vcommon +CustomLog "logs/access_log" vcommon # include part of the server name in the filenames VirtualDocumentRoot "/home/%2/www" @@ -233,7 +233,7 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon <VirtualHost 111.22.33.44> ServerName www.commercial.example.com - CustomLog logs/access_log.commercial vcommon + CustomLog "logs/access_log.commercial" vcommon VirtualDocumentRoot "/www/commercial/%0/docs" VirtualScriptAlias "/www/commercial/%0/cgi-bin" @@ -242,7 +242,7 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon <VirtualHost 111.22.33.45> ServerName www.homepages.example.com - CustomLog logs/access_log.homepages vcommon + CustomLog "logs/access_log.homepages" vcommon VirtualDocumentRoot "/www/homepages/%0/docs" ScriptAlias "/cgi-bin/" "/www/std-cgi/" @@ -278,7 +278,7 @@ UseCanonicalName DNS # include the IP address in the logs so they may be split LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon -CustomLog logs/access_log vcommon +CustomLog "logs/access_log" vcommon # include the IP address in the filenames VirtualDocumentRootIP "/www/hosts/%0/docs"