From 11ec9b664356d5689ca8cdf50355aa0a3e6bb513 Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Mon, 23 Aug 2010 11:13:23 +0000 Subject: [PATCH] Add information about "||" and "|$" piped log 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 | 18 ++++++++++++++++++ docs/manual/mod/core.xml | 7 +++++-- docs/manual/mod/mod_log_config.xml | 3 ++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/manual/logs.xml b/docs/manual/logs.xml index 1007e49cb8..2cd776f524 100644 --- a/docs/manual/logs.xml +++ b/docs/manual/logs.xml @@ -565,6 +565,24 @@

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 without invoking + a shell. Use "|$" instead of "|" + to spawn using a shell (usually with /bin/sh -c):

+ + + # Invoke "rotatelogs" using a shell + CustomLog "|$/usr/local/apache/bin/rotatelogs + /var/log/access_log 86400" common + + +

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 + "||" is also supported and equivalent to using + "|".

diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 021b8b8153..820d9146c1 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -993,13 +993,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 b25f30501e..7761b69edc 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -391,7 +391,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 -- 2.40.0