From: Rainer Jung Date: Thu, 26 Aug 2010 10:51:43 +0000 (+0000) Subject: Add information about "||" piped log syntax X-Git-Tag: 2.2.17~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93c548ec81e5ef4857d73a9b3716a166a49e26b2;p=thirdparty%2Fapache%2Fhttpd.git Add information about "||" piped log syntax to the docs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@989598 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/logs.xml b/docs/manual/logs.xml index 1e13f4dc3ab..305d61a7a68 100644 --- a/docs/manual/logs.xml +++ b/docs/manual/logs.xml @@ -513,6 +513,22 @@

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.

+ +

By default the piped log process is spawned using a shell. + (usually with /bin/sh -c). + 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.

+ +

Use "||" instead of "|" + to spawn without invoking a shell:

+ + + # Invoke "rotatelogs" without using a shell
+ CustomLog "||/usr/local/apache/bin/rotatelogs + /var/log/access_log 86400" common +
diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 8ef97d2044c..43971074f0e 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -1098,13 +1098,16 @@ in case of an error

If the file-path - begins with a pipe (|) then it is assumed to be a command to spawn - to handle the error log.

+ begins with a pipe character "|" then it is assumed to be a + command to spawn to handle the error log.

Example ErrorLog "|/usr/local/bin/httpd_errors" +

See the notes on piped logs for + more information.

+

Using syslog instead of a filename enables logging via syslogd(8) if the system supports it. The default is to use syslog facility local7, but you can override this by diff --git a/docs/manual/mod/mod_log_config.xml b/docs/manual/mod/mod_log_config.xml index 69ce28e28fd..e1802617bcc 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -377,7 +377,8 @@

pipe
The pipe character "|", followed by the path to a program to receive the log information on its standard - input. + input. See the notes on piped logs + for more information. Security:

If a program is used, then it will be run as the user who