On Friday, December 15, 2023 at 11:02:59 AM UTC-8 Joel Bion wrote:

Why not write a short bash or Python script that looks to see where weewx 
is logging and when finding it either:
1) prints out help text telling the user where to find it
Or
2) starts dumping the log to stdout. 
And on error, reports “can’t find it”
Is this reasonable? Or are the places so varied and undeterminable at 
runtime that such a script would be unwritable?


Think not.  Print out to 'which' user and 'where' ?  There isn't a user to 
print out to when you run as a daemon.  That's what syslogs are for.

The answer here is not specific at all to weewx:

   - on a modern os that uses systemd you need to learn how to use 
   journalctl to see your logs and make that transition in how you do things
   - if you chose to 'add' a syslog daemon (there are many to pick from) 
   you need to know where 'that' will log to and how to configure it and view 
   its logs
   - if you are running via docker you already have a problem with getting 
   running containers to log someplace in your infrastructure

This is a documentation issue.  Unfortunately logging is complicated 
because it can be done in so many ways.

Logging in v5 betas has been evolving a bit so I suspect the docs have not 
caught up completely there.

   - https://www.weewx.com/docs/5.0/usersguide/where/#log-files still 
   presumes syslogd is installed and running and there are some other errors 
   there regarding permissions.    Given the os planned to be supported, they 
   should all reference systemd in my opinion.
   - https://github.com/weewx/weewx/wiki/WeeWX-v4-and-logging is too 
   low-level for me but it is good for how to customize logging of what's 
   logged when by weewx once it's logging 'somewhere'
   - https://github.com/weewx/weewx/wiki/view-logs is much more correct to 
   my eyes in the general sense although I disagree a lot there too.  The 
   default is not syslog.  The default is the operating system's logging 
   infrastructure.  That is journald mostly these days and especially for the 
   os variants+versions v5 will support for packages.

As I said, logging is complicated and documenting it clearly and completely 
for all the os variants is hard to do.

But ultimately you need to know how your os does things.

-- 
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/5c0aca99-a923-4631-9d06-ff64bf443329n%40googlegroups.com.

Reply via email to