diff options
author | Graham Leggett <minfrin@apache.org> | 2010-02-16 23:23:09 +0100 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2010-02-16 23:23:09 +0100 |
commit | 3821fbfeffff4e7489f65ce0227b0823335ef5b2 (patch) | |
tree | 3ea54d5769641415107d71477fc42b2bbd2843d8 /docs/manual/programs/rotatelogs.html.en | |
parent | support/rotatelogs: Support the simplest log rotation case, log (diff) | |
download | apache2-3821fbfeffff4e7489f65ce0227b0823335ef5b2.tar.xz apache2-3821fbfeffff4e7489f65ce0227b0823335ef5b2.zip |
Update transformations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910732 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/programs/rotatelogs.html.en')
-rw-r--r-- | docs/manual/programs/rotatelogs.html.en | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/docs/manual/programs/rotatelogs.html.en b/docs/manual/programs/rotatelogs.html.en index 317859861c..d74f7449dc 100644 --- a/docs/manual/programs/rotatelogs.html.en +++ b/docs/manual/programs/rotatelogs.html.en @@ -65,6 +65,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 @@ -76,11 +84,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> @@ -148,6 +157,15 @@ an offset.</dd> will be created of the form <code>errorlog.YYYY-mm-dd-HH_MM_SS</code>.</p> +<div class="example"><p><code> + CustomLog "|bin/rotatelogs -t /var/logs/logfile 86400" common +</code></p></div> + + <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> + </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> <div class="section"> <h2><a name="portability" id="portability">Portability</a></h2> |