On Friday, December 15, 2023 at 8:48:11 PM UTC-5 Greg Troxel wrote: "[email protected]" <[email protected]> writes:
> Pondering more on weewx set up creating > /etc/logrotate.d/weewx > /etc/rsyslog.d/weewx.conf > /var/log/weewx > While these are all ineffectual as /var/log/weewx/weewx.log will never be > created, there harmless and silently ignored. Generally, all of this should be conditional on figuring out if the OS has these concepts. And, modern packaging has a strong bias to only writing within your prefix. (I have yet to try out weewx 5 myself.) that is an argument to put everything into post, since a generic package declaration has no way to know whether the target system uses upstart, sysV, or systemd, much less whether the target uses only systemd-journald, a combination of systemd-journald and (rsyslog|syslog-ng), or just syslog. and that is not even considering the case that paul points out, where you install a syslog-less base os then install rsyslog later so that logging will happen as <deity> intended ;) it is even more complicated by the way systemd is sort-of-but-not-really compatible/interoperable - it keeps many of the other artifacts around but ignores them. or, like networkmanager, fights with them. anyway, i think we are zeroing in on two approaches: 1) deploy the syslog and logrotate conf files if those directories exist, whether or not the operating system has syslog enabled. uninstall will remove those files. the post-pip script does the same thing. (note to self: we need to make that script have both 'install' and 'uninstall' options) 2) make weewx do its own logging to file in ~/weewx-data/log (or /var/log/weewx for deb/rpm), independent of any system logging. postgres, grafana, influx, ELK, atlassian, and many others do it this way, with a configuration option to send their messages to syslog. that way repackagers, administrators, or anyone gets a good out-of-box experience, but can integrate into their toolchains with little fuss (ok, a lot of fuss for atlassian, thank you java). i have updated the docs at https://weewx.com/docs/5.0 to reflect (1), as we are not ready to change weewx to the (2) pattern. its hard enough to tell someone how to find a system log, let alone distinguish between weewxd.log, weectl-import.log, weectl-database.log, etc. -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/428aa207-a3b6-4f14-a7ea-83cd028588e9n%40googlegroups.com.
