i have been playing with debian bookworm, where rsyslog is no longer in the core and has to be installed (if you use it). i would describe that as a ’new’ dependency for weewx under debian
the weewx 5.0 re-packaging looks awesome - i have now tried pip-installing it under bookworm
i have also been playing with systemd journalctl, which is now core to debian bookworm. i know there are systemd haters, but there it is. so for those users who will want to use the standard operational environment, we need a bridge from weewx [Logging] into journalctl, given rsyslog will continue to be the logging engine within weewx
there is class systemd.journal.JournalHandler that can be used under [Logging]. it is an external module, not (yet?) part of the logging.handlers module. i tried to pip a couple of pypy modules (systemd and systems-python) but both have install issues. so i have tried apt install python3-systemd, updated env/pyenv.cfg to include external packages, then updated weewx.conf as follows:
- copied all the [Logging] section from defaults into weewx.conf
- change [[root]] handlers = systemd,
- add [[handlers]] [[[systemd]]]
level = DEBUG
formatter = verbose
class = systemd.journal.JournalHandler
SYSLOG_IDENTIFIER = weewx
i had to add the SYSLOG_IDENTIFIER because the JournalHandler defaults to using the whole path of weewxd as the logging ident not just the basename
then journalctl can be run as usual, using -t to select just weewx entries e.g. journalctl -t weewx -f is equiv to tail -f /var/log/weewx.log.
cheers