Summary: | newsyslog may "double rotate" logs with duplicate rules | ||
---|---|---|---|
Product: | Base System | Reporter: | Josef 'Jeff' Sipek <jeffpc> |
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | New --- | ||
Severity: | Affects Only Me | CC: | michaelo, pat |
Priority: | --- | ||
Version: | 14.1-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Josef 'Jeff' Sipek
2024-11-09 01:42:35 UTC
What is the actual bug you are trying to report? Specifying the same log file name multiple times (across newsyslog.d/*.conf snippets) doesn't result in a single log rotation - it results in the same log getting rotated multiple times resulting in log data loss since the previous rotated log is overwritten by the second/third/etc. rotation. Btw, this multi-rotation happens completely silently and there is no indication that something like that is happening. I expected one of these instead: 1. take the last entry for each log file name 2. warn if there are multiple instances of the same log file name (In reply to Josef 'Jeff' Sipek from comment #3) Well, neither is documented in the manpage, I'd say that the behavior you have is undefined. Agreed. It is currently undefined. IMO it'd be a good thing to allow the "overriding" behavior to make config management easier - rewriting existing files is always more painful than being able to drop a fragment into a .d directory. So, I suppose this ticket is a request to define a behavior - I don't really care how it is defined, but (the current undefined behavior of) silent log file loss is a bad. |