Package: logrotate
Version: 3.7.1-5
Severity: minor
Tags: patch

Hi,

I was going to send this patch straight upstream, but I'm confused as to where
that is exactly, so I'll just put it here.

The attached patch notest the fact that the dateformat option must be
lexically sortable, since logrotate relies on sorting to find the oldest log
file to remove.

Please consider including this, to prevent user surprise when recent logfiles
are removed instead of the old ones.

Gr.

Matthijs
Index: logrotate-3.7.8/logrotate.8
===================================================================
--- logrotate-3.7.8.orig/logrotate.8	2010-05-03 12:25:04.013761517 +0200
+++ logrotate-3.7.8/logrotate.8	2010-05-03 12:30:48.533394582 +0200
@@ -222,6 +222,10 @@
 The default value is -%Y%m%d. Note that also the character separating log
 name from the extension is part of the dateformat string. The system clock
 must be set past Sep 9th 2001 for %s to work correctly.
+Note that the datestamps generated by this format must be lexically sortable
+(e.g., 1999.12 is, but 12/1999 is not, since 11/2000 would sort lower).  When
+using the \fBrotate\fR option, logrotate sorts all rotated filenames to find
+out which logfiles are older and should be removed.
 
 .TP
 \fBdelaycompress\fR

Reply via email to