]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add information about "||" piped log syntax
authorRainer Jung <rjung@apache.org>
Thu, 26 Aug 2010 10:51:43 +0000 (10:51 +0000)
committerRainer Jung <rjung@apache.org>
Thu, 26 Aug 2010 10:51:43 +0000 (10:51 +0000)
to the docs.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@989598 13f79535-47bb-0310-9956-ffa450edef68

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

index 1e13f4dc3abf04c88dbdf01db8e56610599b6c3e..305d61a7a685529a78cfd4cab60f79f4a78aef7b 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 using a shell.
+    (usually with <code>/bin/sh -c</code>).
+    Depending on the shell specifics invocation via shell might
+    lead to an additional shell process for the lifetime of the
+    logging pipe program and signal handling problems during
+    restart.</p>
+
+    <p>Use "<code>||</code>" instead of "<code>|</code>"
+    to spawn without invoking a shell:</p>
+
+    <example>
+      # Invoke "rotatelogs" without using a shell<br />
+      CustomLog "||/usr/local/apache/bin/rotatelogs
+      /var/log/access_log 86400" common
+    </example>
   </section>
 
   <section id="virtualhost">
index 8ef97d2044c13d75b4c96c65b60dca15d455105b..43971074f0eefbf785171b9ac6cd96a739cceb63 100644 (file)
@@ -1098,13 +1098,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 69ce28e28fd422c430685126bd84cb5ffd99acb0..e1802617bccb6da03a45cbe9f8cd4af85ef01825 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