You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by po...@apache.org on 2010/10/19 17:12:26 UTC

svn commit: r1024264 - /httpd/httpd/branches/2.2.x/docs/manual/programs/rotatelogs.xml

Author: poirier
Date: Tue Oct 19 15:12:26 2010
New Revision: 1024264

URL: http://svn.apache.org/viewvc?rev=1024264&view=rev
Log:
Add warning about using rotatelogs filename formats with not
enough granularity.  PR46318.

Modified:
    httpd/httpd/branches/2.2.x/docs/manual/programs/rotatelogs.xml

Modified: httpd/httpd/branches/2.2.x/docs/manual/programs/rotatelogs.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/programs/rotatelogs.xml?rev=1024264&r1=1024263&r2=1024264&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/programs/rotatelogs.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/programs/rotatelogs.xml Tue Oct 19 15:12:26 2010
@@ -64,7 +64,7 @@ causes problems from some automated logg
 
 <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
 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>