Public bug reported:

A file which matches two different patterns in the logrotate.conf file causes a
"duplicate log entry" error. The file is rotated but no other subsequent files 
are rotated.

This is illogical.
(1) If a duplicate log entry is indeed an error then that file should not be 
rotated. It is.
(2) Files to be rotated which are not in error should still be rotated. They 
are not.
(3) [Small but important point:] The message is misleading - what is detected 
by logrotate is not a duplicate log entry but that a file matches more than one 
log entry. If no such duplicate +file+ exists the duplicate +log entry+ is not 
detected.

Suggestions:
(A) A duplicate should prevent processing of that file, but that file only.
(B) A resolution hierarchy be specified so that [optionally - new directive?] 
which of the various duplicates should be used. Last [or first?] takes 
precedence.
(C) Error message should be improved. Perhaps "file matches more than one 
pattern"

Whatever, there is no easy workaround for the problem I describe here.
For example: I wish to rotate all of many *.log files according to one
rule except for special.log which I wish to rotate according to another

*.log {
  <directives>
}

special.log {
  <other directives>
}

has the above described behaviour. special.log is rotated, others are
not. Yes, I have tested this, reversed the order, etc etc.

** Affects: logrotate (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1764726

Title:
  logrotate duplicate processing incorrect

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1764726/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to