{"id":7165,"date":"2023-01-22T11:50:40","date_gmt":"2023-01-22T09:50:40","guid":{"rendered":"https:\/\/mummila.net\/kommentit\/?p=7165"},"modified":"2023-01-22T11:50:40","modified_gmt":"2023-01-22T09:50:40","slug":"duplicate-log-entry-instead-of-later-definitions-overriding-earlier-ones-as-man-page-says","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2023\/01\/22\/duplicate-log-entry-instead-of-later-definitions-overriding-earlier-ones-as-man-page-says\/","title":{"rendered":"&#8221;Duplicate log entry&#8221; instead of later definitions overriding earlier ones, as man page says"},"content":{"rendered":"<p>The man page for logrotate says &#8221;Each configuration file can set global options (local definitions override global ones, and later definitions override earlier ones)&#8221;. This is inconsistent with how it actually behaves.<\/p>\n<p>== Steps to reproduce ==<br \/>\n    $ logrotate &#8211;version<br \/>\n    logrotate 3.14.0<\/p>\n<p>        Default mail command:       \/usr\/bin\/mail<br \/>\n        Default compress command:   \/bin\/gzip<br \/>\n        Default uncompress command: \/bin\/gunzip<br \/>\n        Default compress extension: .gz<br \/>\n        Default state file path:    \/var\/lib\/logrotate\/status<br \/>\n        ACL support:                yes<br \/>\n        SELinux support:            yes<br \/>\n    $ mkdir \/tmp\/logrotest<br \/>\n    $ cd \/tmp\/logrotest<br \/>\n    $ touch test.log<br \/>\n    $ touch other.log<br \/>\n    $ cat &gt;logrotate.conf<br \/>\n    \/tmp\/logrotest\/*.log {<br \/>\n        minsize 5M<br \/>\n    }<\/p>\n<p>    \/tmp\/logrotest\/test.log {<br \/>\n        minsize 1M<br \/>\n    }<br \/>\n    $ logrotate &#8211;state \/tmp\/logrostate logrotate.conf <\/p>\n<p>== What happens ==<br \/>\n    error: logrotate.conf:5 duplicate log entry for \/tmp\/logrotest\/test.log<\/p>\n<p>== What I expect to happen instead ==<br \/>\nNo error, test.log being processed with its specific, later-defined directives.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The man page for logrotate says &#8221;later definitions override earlier ones&#8221;. This is inconsistent with how it actually behaves: erroring out.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8860],"tags":[22946],"class_list":["post-7165","post","type-post","status-publish","format-standard","hentry","category-vianhallintajarjestelmat","tag-logrotate","sijainti-launchpad"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/7165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/comments?post=7165"}],"version-history":[{"count":2,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/7165\/revisions"}],"predecessor-version":[{"id":7168,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/7165\/revisions\/7168"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=7165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=7165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=7165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}