Avainsanana Logrotate

In fact the man page seems to be completely out of sync with reality

22. tammikuuta 2023 klo 12.30
Sijainti: Vianhallintajärjestelmät: Launchpad
Avainsanat: Logrotate

In fact the man page seems to be completely out of sync with reality. None of minage, maxage, minsize and maxsize appear to work at all despite being documented there. Minage is read at least (according to debug output), but then still ignored. Specifying minsize or maxsize has no effect, logs are rotated when they hit 1 M regardless. At least the plain `size` directive does appear to work as documented.

Vastaa viestiin sen kontekstissa (Launchpad)

”Duplicate log entry” instead of later definitions overriding earlier ones, as man page says

22. tammikuuta 2023 klo 11.50
Sijainti: Vianhallintajärjestelmät: Launchpad
Avainsanat: Logrotate

The man page for logrotate says ”Each configuration file can set global options (local definitions override global ones, and later definitions override earlier ones)”. This is inconsistent with how it actually behaves.

== Steps to reproduce ==
$ logrotate –version
logrotate 3.14.0

Default mail command: /usr/bin/mail
Default compress command: /bin/gzip
Default uncompress command: /bin/gunzip
Default compress extension: .gz
Default state file path: /var/lib/logrotate/status
ACL support: yes
SELinux support: yes
$ mkdir /tmp/logrotest
$ cd /tmp/logrotest
$ touch test.log
$ touch other.log
$ cat >logrotate.conf
/tmp/logrotest/*.log {
minsize 5M
}

/tmp/logrotest/test.log {
minsize 1M
}
$ logrotate –state /tmp/logrostate logrotate.conf

== What happens ==
error: logrotate.conf:5 duplicate log entry for /tmp/logrotest/test.log

== What I expect to happen instead ==
No error, test.log being processed with its specific, later-defined directives.

Vastaa viestiin sen kontekstissa (Launchpad)