]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add warning about using rotatelogs filename formats with not
authorDaniel Earl Poirier <poirier@apache.org>
Tue, 19 Oct 2010 15:12:26 +0000 (15:12 +0000)
committerDaniel Earl Poirier <poirier@apache.org>
Tue, 19 Oct 2010 15:12:26 +0000 (15:12 +0000)
enough granularity.  PR46318.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1024264 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/programs/rotatelogs.xml

index 365437774da40c94719f85487f0156389b6d39b2..bdfb34bbd8dd19cccbc871885cef37cfc9c566fb 100644 (file)
@@ -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>