[Bug 1764726] Re: logrotate duplicate processing incorrect
Paul Beardsell
paul at beardsell.com
Wed Apr 18 11:25:13 UTC 2018
** Description changed:
- 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.
+ logrotate 3.11.0
+
+ 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
+ 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. This conf
+ file has the above described behaviour:
*.log {
- <directives>
+ <directives>
}
special.log {
- <other directives>
+ <other directives>
}
- has the above described behaviour. special.log is rotated, others are
- not. Yes, I have tested this, reversed the order, etc etc.
+ special.log is rotated, a "duplicate log entry" is reported, other
+ processing stops. Yes, I have tested this, reversed the order, etc etc.
+ If I take out the special.log stanza then the other files are
+ successfully rotated.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1764726
Title:
logrotate duplicate processing incorrect
Status in logrotate package in Ubuntu:
New
Bug description:
logrotate 3.11.0
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. This conf
file has the above described behaviour:
*.log {
<directives>
}
special.log {
<other directives>
}
special.log is rotated, a "duplicate log entry" is reported, other
processing stops. Yes, I have tested this, reversed the order, etc
etc. If I take out the special.log stanza then the other files are
successfully rotated.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1764726/+subscriptions
More information about the foundations-bugs
mailing list