]> granicus.if.org Git - apache/commitdiff
Add information about "||" and "|$" piped log
authorRainer Jung <rjung@apache.org>
Mon, 23 Aug 2010 11:13:23 +0000 (11:13 +0000)
committerRainer Jung <rjung@apache.org>
Mon, 23 Aug 2010 11:13:23 +0000 (11:13 +0000)
syntax to the docs.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@988071 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/logs.xml
docs/manual/mod/core.xml
docs/manual/mod/mod_log_config.xml

index 1007e49cb8167c63d1cd6ae7d8efd41aa5ec7682..2cd776f524511b361c98e067b6f81a1701a8a72c 100644 (file)
     <p>As with conditional logging, piped logs are a very powerful
     tool, but they should not be used where a simpler solution like
     off-line post-processing is available.</p>
+
+    <p>By default the piped log process is spawned without invoking
+    a shell. Use "<code>|$</code>" instead of "<code>|</code>"
+    to spawn using a shell (usually with <code>/bin/sh -c</code>):</p>
+
+    <example>
+      # Invoke "rotatelogs" using a shell
+      CustomLog "|$/usr/local/apache/bin/rotatelogs
+      /var/log/access_log 86400" common
+    </example>
+
+    <p>This was the default behaviour for Apache 2.2.
+    Depending on the shell specifics this might lead to
+    an additional shell process for the lifetime of the logging
+    pipe program and signal handling problems during restart.
+    For compatibility reasons with Apache 2.2 the notation
+    "<code>||</code>" is also supported and equivalent to using
+    "<code>|</code>".</p>
   </section>
 
   <section id="virtualhost">
index 021b8b8153cc88319b204db4d747207ddcb2fe35..820d9146c1a7e3678cd073a9e24149d2a9fe4f28 100644 (file)
@@ -993,13 +993,16 @@ in case of an error</description>
     </example>
 
     <p>If the <var>file-path</var>
-    begins with a pipe (|) then it is assumed to be a command to spawn
-    to handle the error log.</p>
+    begins with a pipe character "<code>|</code>" then it is assumed to be a
+    command to spawn to handle the error log.</p>
 
     <example><title>Example</title>
     ErrorLog "|/usr/local/bin/httpd_errors"
     </example>
 
+    <p>See the notes on <a href="../logs.html#piped">piped logs</a> for
+    more information.</p>
+
     <p>Using <code>syslog</code> instead of a filename enables logging
     via syslogd(8) if the system supports it. The default is to use
     syslog facility <code>local7</code>, but you can override this by
index b25f30501e4baa85b0de8fe1b80499b680bc6fce..7761b69edc5ffbbb805ac58ad2cd1ca1d4e51a36 100644 (file)
       <dt><var>pipe</var></dt>
       <dd>The pipe character "<code>|</code>", followed by the path
       to a program to receive the log information on its standard
-      input.
+      input. See the notes on <a href="../logs.html#piped">piped logs</a>
+      for more information.
 
       <note type="warning"><title>Security:</title>
       <p>If a program is used, then it will be run as the user who