Commit 1898281a authored by Daniel Earl Poirier's avatar Daniel Earl Poirier
Browse files

Add warning about using rotatelogs filename formats with not

enough granularity.  PR46318.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1024264 13f79535-47bb-0310-9956-ffa450edef68
parent 09b18761
Loading
Loading
Loading
Loading
+12 −2
Changes for docs/manual/programs/rotatelogs.xml: 12 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ causes problems from some automated logging tools).

<dt><code><var>logfile</var></code></dt>

<dd>The path plus basename of the logfile.  If <var>logfile</var>
<dd><p>The path plus basename of the logfile.  If <var>logfile</var>
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
@@ -72,7 +72,17 @@ 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>
beginning of the current 24-hour period (midnight).</p>
<p>When using <code>strftime(3)</code> filename formatting,
be sure the log file format has enough granularity to produce
a different file name each time the logs are rotated.  Otherwise
rotation will overwrite the same file instead of starting a new
one.  For example, if <var>logfile</var> was 
<code>/var/logs/errorlog.%Y-%m-%d</code> with log rotation at 5
megabytes, but 5 megabytes was reached twice in the same day, the
same log file name would be produced and log rotation would keep
writing to the same file.</p>
</dd>

<dt><code><var>rotationtime</var></code></dt>