rsyslog Deprecation in Debian 12
The release date of Debian 12 has been set to June 10, 2023
So Weewx V5 installs will be affected shortly. Seems wise to get ahead of it in the Docs.
Please note I am trying
not
to rant about this change and simply start what it is and how it affects Wee
Wx.
In Debian 12, since the persistent journal from Systemd's journald has been activated and most log messages would end up being written twice on disk, the rsyslog package has been demoted from the Important to the Optional priority, which means it is no longer installed by default in a base Debian system
.It is still possible to install the rsyslog package and it will work as usual.If you have upgraded from an older Debian release, and did not explicitly remove rsyslog you will not be affected by the change.
Under Debian 12
sudo tail -f /var/log/syslog
results in:
tail: cannot open '/var/log/syslog' for reading: No such file or directory
tail: no files remaining
In Debian 12 you can use the journalctl command to read log messages, which are stored in a binary format under /var/log/journal.
sudo journalctl -ef
-e --pager-end Immediately jump to the end in the pager
-f --follow Follow the journal
similar to running tail -f /var/log/syslog on previous versions of Debian.
Or a little cleaner, show only WeeWx data, assuming weewx running under systemd with a weewx.service file.
sudo journalctl -u weewx -f
-u --unit=UNIT Show logs from the specified unit
-f --follow Follow the journal
This Debian change breaks
User Guide
Running WeeWX
Monitoring WeeWX
"To watch the log as it is generated, use the tail command with the -f option: tail -f /var/log/syslog
" And the Troubleshooting guide
"Did you look at the log file?"
"sudo tail -f /var/log/syslog
"
So to read last hour of WeeWwx log, assuming weewx running under systemd with a weewx.service file.
journalctl --since "1 hour ago" -u weewx
-u --unit=UNIT Show logs from the specified unit