I tried to follow the instructions in the v4 logging wiki, 
https://github.com/weewx/weewx/wiki/WeeWX-v4-and-logging.  I added this to my 
weewx.conf file:

 

[Logging]

    [[loggers]]

        # Root logger

        [[[root]]]

          handlers = rotate,                # 1

    [[handlers]]

        # Log to a set of rotating files    

        [[[rotate]]]

            level = DEBUG                   # 2

            formatter = standard            # 3

            class = logging.handlers.RotatingFileHandler  # 4

            filename = /var/log/weewx.log   # 5

            maxBytes = 10000000             # 6

            backupCount = 4                 # 7

 

Nothing is being logged to the weewx.log file and weewx is not updating the 
archive file or reports.  It appears weewx has crashed but syslog is not 
showing anything which I’m assuming indicates the program is trying to write to 
the weewx.log file but cannot hence it isn’t recording any error messages.

 

I tried top add syslog to the handlers thinking something might show up in 
syslog.

 

handlers = rotate, syslog               

 

This is what I get in the syslog file:

 

May 15 14:20:21 raspberrypi systemd[1]: Starting LSB: weewx weather system...

May 15 14:20:21 raspberrypi weewx[2183] INFO __main__: Initializing weewx 
version 4.0.0

May 15 14:20:21 raspberrypi weewx[2183] INFO __main__: Using Python 3.7.3 
(default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0]

May 15 14:20:21 raspberrypi weewx[2183] INFO __main__: Platform 
Linux-4.19.97-v7+-armv7l-with-debian-10.4

May 15 14:20:21 raspberrypi weewx[2183] INFO __main__: Locale is 'en_US.UTF-8'

May 15 14:20:21 raspberrypi weewx[2183] INFO __main__: PID file is 
/var/run/weewx.pid

 

This is a new install.  Everything works fine until I try to add [Logging} to 
the weewx.conf file.

 

Tom

From: [email protected] <[email protected]> On Behalf Of 
Tom Keffer
Sent: Friday, May 15, 2020 6:55 AM
To: weewx-user <[email protected]>
Subject: Re: [weewx-user] Noisy logging, log_success = False not followed

 

Version 4.0 allows much more control over what gets logged 
<https://github.com/weewx/weewx/wiki/WeeWX-v4-and-logging> . To suppress 
everything below log level WARN, put this at the bottom of weewx.conf:

 

[Logging]
  [[loggers]]
    [[[weewx.manager]]]
      level = WARN

 

-tk

 

On Thu, May 14, 2020 at 9:53 PM Chris Nelson <[email protected] 
<mailto:[email protected]> > wrote:

These two log.info <http://log.info>  lines in manager.py do not use the config 
file log_success switch, resulting in entries every five minutes.  Adding the 
log_success switch test within _addSingleRecord instances is not trivial since 
the config is not passed to the object.

 

May 12 18:55:15 shop2 journal: weewx[7760] INFO weewx.manager: Added record 
2020-05-12 18:55:00 MST (1589334900) to database 'weewx.sdb'

May 12 18:55:15 shop2 journal: weewx[7760] INFO weewx.manager: Added record 
2020-05-12 18:55:00 MST (1589334900) to daily summary in 'weewx.sdb'

 

This was noted back in 2017 also by Daniel Jönsson in this thread 
<https://groups.google.com/forum/#!topic/weewx-user/-OJF9-XBU3s>  - not a new 
issue.  I just commented out the two calls to log.info <http://log.info> ().  
I'm just working to clean up noise in my system log.

-- 
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 [email protected] 
<mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/11778f1a-f56b-4753-97e9-4bc53c9a03e3%40googlegroups.com
 
<https://groups.google.com/d/msgid/weewx-user/11778f1a-f56b-4753-97e9-4bc53c9a03e3%40googlegroups.com?utm_medium=email&utm_source=footer>
 .

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEDmQAMGzTFNDmhsXBupmo9e65%2B2CPEDDGiEuinW%2BYXXfg%40mail.gmail.com
 
<https://groups.google.com/d/msgid/weewx-user/CAPq0zEDmQAMGzTFNDmhsXBupmo9e65%2B2CPEDDGiEuinW%2BYXXfg%40mail.gmail.com?utm_medium=email&utm_source=footer>
 .

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/00b201d62aef%24c7b1d8c0%2457158a40%24%40gmail.com.

Reply via email to