Package: logrotate Version: 3.11.0-0.1 Severity: wishlist I would like to make the following suggestion as change to the logrotate cron job. We occasionally see logrotate errors at Teckids, but some that are not reproducible and only occur once every few weeks. Unfortunately, for some of them, logrotate does not lgo the root cause when not run verbose, and running verbose produces a flood of mails from cron while waiting for the error to occur.
My suggestion is to colelct the verbose output and output it in case of an error, by changing the daily cron job to something like this: ==================== snip ================= #!/bin/sh test -x /usr/sbin/logrotate || exit 0 tempfile=$(mktemp) /usr/sbin/logrotate --verbose /etc/logrotate.conf >"$(tempfile)" 2>&1 || cat "$(tempfile)" rm -f "$(tempfile)" ==================== snip ================= -- System Information: Debian Release: 9.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages logrotate depends on: ii base-passwd 3.5.43 ii cron [cron-daemon] 3.0pl1-128+b1 ii libacl1 2.2.52-3+b1 ii libc6 2.24-9 ii libpopt0 1.16-10+b2 ii libselinux1 2.6-3+b1 Versions of packages logrotate recommends: ii bsd-mailx [mailx] 8.1.2-0.20160123cvs-3 logrotate suggests no packages. -- no debconf information