Am So., 30. Mai 2021 um 07:39 Uhr schrieb Harald Dunkel <ha...@afaics.de>: > > Package: logrotate > Version: 3.18.1-1 > Severity: wishlist > > Would you mind to enable logrotate logging for Bookworm by default? > logrotate appears to be excellent in logging. Its a shame that this > is not used. And since you have to wait 24h for the next run (unless > you enable hourly rotation) it is even more painful to have no log > when you need it. > > This would be very helpful to catch unwanted config files in logrotate.d, > not caught by tabooext, for example. >
By default logrotate logs with normal priority to stderr, which should be captured by callers, e.g. cron or systemd. When logging to a file logrotate does also issue debug messages, which might be the lines you are referring to. I am not sure though if enabling debug logging by default is the way to go. If you want to check what would happen on rotation after configuration changes, you can run `logrotate -vfd /etc/logrotate.conf`. This will not rotate any file but should print every message you might need. > --- /lib/systemd/system/logrotate.service 2020-08-21 15:02:38.000000000 > +0200 > +++ /etc/systemd/system/logrotate.service 2021-05-30 06:48:42.743903674 > +0200 > @@ -6,7 +6,7 @@ > > [Service] > Type=oneshot > -ExecStart=/usr/sbin/logrotate /etc/logrotate.conf > +ExecStart=/usr/sbin/logrotate -l /var/log/logrotate.log /etc/logrotate.conf > As an alternative `ExecStart=/usr/sbin/logrotate -v /etc/logrotate.conf` could be used to forward all debug messages the journal.