diff options
author | Graham Leggett <minfrin@apache.org> | 2010-02-16 22:01:21 +0000 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2010-02-16 22:01:21 +0000 |
commit | 78469c61be845acc1f0330e2522626df9548f943 (patch) | |
tree | e6ad9f5e29fcd93cc21e01006daa1055045380b1 /docs/manual/programs | |
parent | 266104e13f4025aa5422264f2e09924f3461e878 (diff) | |
download | httpd-78469c61be845acc1f0330e2522626df9548f943.tar.gz |
support/rotatelogs: Support the simplest log rotation case, log
truncation. Useful when the log is being processed in real time
using a command like tail.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910719 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/programs')
-rw-r--r-- | docs/manual/programs/rotatelogs.xml | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/docs/manual/programs/rotatelogs.xml b/docs/manual/programs/rotatelogs.xml index 789a71afa6..7c7443a37b 100644 --- a/docs/manual/programs/rotatelogs.xml +++ b/docs/manual/programs/rotatelogs.xml @@ -62,6 +62,14 @@ and when the first request is handled, meaning that the associated logfile does not "exist" until then, which causes problems from some automated logging tools)</dd> +<dt><code>-t</code></dt> +<dd>Causes the logfile to be truncated instead of rotated. This is +useful when a log is processed in real time by a command like tail, +and there is no need for archived data. No suffix will be added to +the filename, however format strings containing '%' characters +will be respected. +</dd> + <dt><code>-v</code></dt> <dd>Produce verbose output on STDERR. The output contains the result of the configuration parsing, and all file open and @@ -73,11 +81,12 @@ close actions.</dd> includes any '%' characters, it is treated as a format string for <code>strftime(3)</code>. Otherwise, the suffix <var>.nnnnnnnnnn</var> is automatically added and is the time in -seconds. Both formats compute the start time from the beginning of -the current period. For example, if a rotation time of 86400 is -specified, the hour, minute, and second fields created from the -<code>strftime(3)</code> format will all be zero, referring to the -beginning of the current 24-hour period (midnight).</dd> +seconds (unless the -t option is used). Both formats compute the +start time from the beginning of the current period. For example, +if a rotation time of 86400 is specified, the hour, minute, and +second fields created from the <code>strftime(3)</code> format will +all be zero, referring to the beginning of the current 24-hour +period (midnight).</dd> <dt><code><var>rotationtime</var></code></dt> @@ -145,6 +154,15 @@ an offset.</dd> will be created of the form <code>errorlog.YYYY-mm-dd-HH_MM_SS</code>.</p> +<example> + CustomLog "|bin/rotatelogs -t /var/logs/logfile 86400" common +</example> + + <p>This creates the file /var/logs/logfile, truncating the file at + startup and then truncating the file once per day. It is expected + in this scenario that a separate process (such as tail) would + process the file in real time.</p> + </section> <section id="portability"><title>Portability</title> |