Upgrade to 5.0.2 from 4.10: where are my logs?

98 views
Skip to first unread message

Invisible Man

unread,
Mar 3, 2024, 9:01:51 AM3/3/24
to weewx-user
I used to redirect the weewx logs which were normally going to /var/log/syslog in /var/tmp/log/weewx.log using /etc/rsyslog.d

:programname,isequal,"weewx" /var/tmp/log/weewx.log
:programname,isequal,"weewx" ~

I upgraded to 5.0.2, asked to keep my personal old configuration, but there are no longer any logs going to /var/tmp/log/weewx.log.
There is no /var/log/weewx either. And /var/log/syslog doesn't have weewx logs.
I do have logs with journalctl -u weewx.

Where are my logs??





John Smith

unread,
Mar 3, 2024, 9:05:31 AM3/3/24
to weewx...@googlegroups.com
Logs were ditched in favour of journald because the weewx v5 no longer runs as root

jounralctl -f -u weewx.service

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/9d507bdb-fb53-4808-a761-10288af5d8d4n%40googlegroups.com.

Invisible Man

unread,
Mar 3, 2024, 9:09:27 AM3/3/24
to weewx-user
Ok, but I have very few logs using journalctl -u weewx.service, whereas I used to have lots of debug logs.

mars 03 14:47:39 vegan systemd[1]: Stopped LSB: weewx weather system.
mars 03 14:47:39 vegan systemd[1]: Starting LSB: weewx weather system...
mars 03 14:47:39 vegan systemd[1]: Started LSB: weewx weather system.

And my weewx database used to be located in /home/weewx/archive/weewx.db. And it looks like it hasn't been updated since. Something is wrong like it's not using the correct configuration at all.

/home/weewx/archive $ ls -lh weewx.sdb
-rw-r--r-- 1 weewx root 119M mars   3 14:30 weewx.sdb

It's 15:00. Last update to weewx.sdb is 14:30. Impossible.

Invisible Man

unread,
Mar 3, 2024, 9:27:17 AM3/3/24
to weewx-user
I found partially why: the upgrade procedure didn't pick up my /etc/default/weewx, just did a backup and created a new one.

WEEWX_PYTHON=python3
WEEWX_BINDIR=/usr/share/weewx
WEEWX_CFG=/etc/weewx/weewx.conf
WEEWX_BIN=/usr/bin/weewxd

And now it's a horror movie to debug the rest :( I wish I hadn't upgraded...

John Smith

unread,
Mar 3, 2024, 9:31:55 AM3/3/24
to weewx...@googlegroups.com
Did you try running weewxd manually on the command line?

matthew wall

unread,
Mar 3, 2024, 2:38:09 PM3/3/24
to weewx-user
On Sunday, March 3, 2024 at 9:27:17 AM UTC-5 axelle....@gmail.com wrote:
I found partially why: the upgrade procedure didn't pick up my /etc/default/weewx, just did a backup and created a new one.

WEEWX_PYTHON=python3
WEEWX_BINDIR=/usr/share/weewx
WEEWX_CFG=/etc/weewx/weewx.conf
WEEWX_BIN=/usr/bin/weewxd

the file /etc/default/weewx does not affect rsyslog

your rsyslog conf has 'isequal,"weewx"', so it will not match the actual name of the weewxd program, which is 'weewxd'

either change 'weewx' to 'weewxd', or use startswith instead of isequal.  take a look at the wiki article about logging:


m

Invisible Man

unread,
Mar 3, 2024, 3:43:40 PM3/3/24
to weewx-user
>your rsyslog conf has 'isequal,"weewx"', so it will not match the actual name of the weewxd program, which is 'weewxd'

Hmm. You are right. But it's strange, in v4.10.2 the program is already named weewxd isn't it? And it's working...

Axelle
Reply all
Reply to author
Forward
0 new messages