Re: [weewx-user] No logs at *ALL*??!

2023-03-24 Thread vince
Still lost what you're getting at, nor if you solved your own problem 
somehow (and how, for the next guy).

Bottom line is you have to understand your os and how it logs.   You also 
have to completely describe your setup so we can try to help.  That's why 
we always ask.


Most common os will log to /var/log/syslog or /var/log/messages or both.   
 Sometimes you need to add a syslog daemon package to the core os (rsyslog 
or syslog-ng or others) and enable 'that' to make logging to those files 
happen, especially if you are systemd based like modern debian/ubuntu.

Your mention of weewx.log tells me you have added a syslog package 
configured to put things now.  No os does that by default.  I'm guessing 
you have rsyslog installed.  You can check with "dpkg -l | grep syslog"

On a systemd-based os (modern debian(ish) and redhat(ish)) you should learn 
journalctl as well.   The systemd borg has been increasingly consuming 
everything everywhere.  We don't control that.

What I asked multiple times for was a basic description of your setup.
A good problem description would have included:

   - you're running ubuntu 22.04 LTS
   - you're running weewx 4.10.2 in a proxmox vm
   - (you STILL have not said if you installed weewx via apt from a 
   package, or if you ran setup.py to install that way)
   - you have rsyslog installed and configured to log weewx to 
   /var/log/weewx.log
   - that log is empty for at least 3 weeks now
   - but system status weewx is showing some recent logs
   - why is my weewx.log empty ?

If you'd provided that as a description of your setup, my assessment would 
have been that you'd added rsyslog log ago and manually started it, and 
that the problem was likely that you didn't enable it to start on boot.   
You should see output similar to this example from a pi.

pi@pi4:~ $ systemctl status rsyslog
● rsyslog.service - System Logging Service
 Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor 
preset: enabled)
 Active: active (running) since Mon 2022-09-12 18:58:43 PDT; 6 months 
10 days ago
TriggeredBy: ● syslog.socket
   Docs: man:rsyslogd(8)
 man:rsyslog.conf(5)
 https://www.rsyslog.com/doc/
   Main PID: 421 (rsyslogd)
  Tasks: 4 (limit: 4915)
CPU: 5min 41.717s
 CGroup: /system.slice/rsyslog.service
 └─421 /usr/sbin/rsyslogd -n -iNONE

Warning: journal has been rotated since unit was started, output may be 
incomplete.

If your system shows empty yet enabled+running, then I'd guess your 
logrotate setup nuked the file but kept the filehandle open, rather than 
doing a proper log rotation.  It happens.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ffa8b96e-4976-4509-900a-8a5b6c88ae8bn%40googlegroups.com.


Re: [weewx-user] No logs at *ALL*??!

2023-03-24 Thread MrPete
@vince, thanks for those thoughts. I will add more detail so you don't need 
to guess on what is likely let alone real...

* Paul Anderson "nailed it" in concluding that my system is running systemd 
/ journald (and journalctl). As I said: "...nailed it. I knew nothing about 
systemd logging. Now I do..." *That was a HUGE "aha!" moment for me!*

* As of March 13 when I started this thread, I hadn't custom configured any 
aspect of logging. (I since did discover the page you linked, and now I do 
have a logrotate-enabled weewxd.log file ;)... but that's immaterial to the 
original question.)

* This VM (in ProxMox 7 VE fwiw) is running a straight install of Ubuntu 
20.04 LTS (and weewx 4.10.2, not that it matters AFAIK?). 

* *I had no idea my setup is unusual. **That's exactly why I asked the 
question. *Until this situation,* I was under the impression that Ubuntu is 
derived from, and essentially similar to, Debian.* I've got several Debian 
VM's but thought I'd try something more stable, hence my choice to use 
Ubuntu LTS. As I'm sure you know better than me, the weewx install for 
Ubuntu is literally identical to that for Debian. All of my other Linux 
instances (VM, NAS, and other) have what I consider a typical logging setup 
(various files in /var/log). So I expected this to function exactly the 
same. Not knowing there was something different, how would I even suspect 
something about the logging system???

A suggestion: apparently systemd, and journald/journalctl, are the 
up-and-coming 'new' logging methodology for linux distros (only around 
since 2015 LOL!) It may help to eventually mention `journalctl` and/or 
other associated commands in one or more of the documentation areas, eg 
FAQ, User's Guide, etc. (As of this moment, the following google searches 
find no mention: site:weewx.com journalctl ... or site:github.com/weewx 
journalctl) 

(BTW, the github record shows that weewx itself must understand the os 
enough to know where to look, and how logging works. There was a `journald` 
related patch just last year, and quite a few systemd-related items.  If 
weewx needs updating for compatibility, I'm not surprised that the docs 
might need updating as well.)

On Monday, March 20, 2023 at 2:42:30 PM UTC-6 vince wrote:

> You said "*/var/log/weewx.log has been empty since the end of January.*" 
>   That file is not created in a vanilla default installation. That means 
> you did something to choose to make that configuration happen. I suspect 
> you might have followed this wiki page (link) 
> .  It is very likely you 
> configured rsyslogd to put weewx logs someplace custom.  It's also possible 
> you didn't enable rsyslogd to run at boot so if your system rebooted it 
> might not even be running.
>
> You've provided zero information about your system.  Nothing about its os 
> or version.  Nothing about its logging.  Nothing about your weewx 
> installation (version, package-or-setup etc.).   In the absence of any real 
> information, there is really not much we can do to help you out other than 
> to point you to the docs of where to look for the usual places.
>
> I do not know what "nailed it" means.
>
> Re: logs - this is in the FAQ (link) 
> , in the 
> User's Guide if you pick your os on (this section) 
> .  Other 
> User's Guide pointer is (here) 
>  and there 
> are a variety of other places logging is mentioned.
>
> Re: operating systems being confusing - that is not a weewx problem.  Each 
> os does things differently.  You have to understand your os enough to know 
> where to look and how logging work on your chosen os.
>
>
>
> On Monday, March 20, 2023 at 1:22:12 PM UTC-7 MrPete wrote:
>
>> NOT "custom logs". I turned on `debug=1` -- if that's customization, ok.
>>
>> Paul Anderson nailed it. 
>>
>> I knew nothing about systemd logging. Now I do. 
>>
>> As a person with some significant background in computing (yet new to 
>> this environment), I suspect the following might be confusing to more than 
>> a few people new to weewx..
>>
>> *Here is the extent of the documentation help for those who happen to 
>> have a system using systemd/journald:*
>>
>> "WeeWX logs many events to the system log. On Debian systems, this is 
>> /var/log/syslog, on SuSE, /var/log/messages. Your system may use yet 
>> another place. When troubleshooting the system, be sure to check it!"
>>
>> :-D
>>
>>
>> On Wednesday, March 15, 2023 at 2:21:13 AM UTC-6 vince wrote:
>>
>>> [...vent mode on, I guess...]
>>> We are seeing these kinds of threads all too often these days...
>>>
>>> A post essentially saying "*my standard logs from systemd are there, 
>>> but my old custom logs are gone - where are they?*" is an impossible 
>>> ask.
>>>
>>> Given the original description saying 

[weewx-user] Forecast template issues w/exfoliation

2023-03-24 Thread joe...@gmail.com
Hello,

I am running weewx 4.10.2 and forecast 3.4.0b12.

My forecast page will not update 
http://71.56.221.55:32983/weewx/forecast.html

I here is what the log says:
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator: 
Evaluation of template /etc/weewx/skins/exfoliation/forecast.html.tmpl 
failed with exception ''
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:  
Ignoring template /etc/weewx/skins/exfoliation/forecast.html.tmpl
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:  
Reason: u'N'
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:  
 Traceback (most recent call last):
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:    
 File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:  
 unicode_string = compiled_template.respond()
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:    
 File "_etc_weewx_skins_exfoliation_forecast_html_tmpl.py", line 335, in 
respond
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:    
 File "_etc_weewx_skins_exfoliation_forecast_html_tmpl.py", line 112, in 
__errorCatcher7
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:    
 File "", line 1, in 
Mar 24 10:05:34 WEEWXPi-2 weewx[803] ERROR weewx.cheetahgenerator:  
 KeyError: u'N'

I cannot figure out what happened. Any ideas?

Joe Brockway

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/488c9327-af1a-4982-8858-a551becee7c8n%40googlegroups.com.