Following these instructions I had logging to weewx.log working.  I upgraded to 
4.1.0 and am now logging to syslog and not weewx.log.  I tied Logging with and 
without the integers in my config file as below.

 

#[Logging]

#    [[loggers]]

#        # Root logger

#        [[[root]]]

#            handlers = rotate,    

#    [[handlers]]

#        # Log to a set of rotating files    

#        [[[rotate]]]

#            level = DEBUG   

#            formatter = verbose    

#            class = logging.handlers.RotatingFileHandler   

#            filename = /var/log/weewx.log    

#            maxBytes = 10000000    

#            backupCount = 4           

 

[Logging]

    [[loggers]]

        # Root logger

        [[[root]]]

            handlers = rotate,    

    [[handlers]]

        # Log to a set of rotating files    

        [[[rotate]]]

            level = DEBUG   

            formatter = verbose    

            class = logging.handlers.RotatingFileHandler   

            filename = /var/log/weewx.log

 

Tom

 

From: weewx-user@googlegroups.com <weewx-user@googlegroups.com> On Behalf Of 
Tom Keffer
Sent: Friday, May 15, 2020 7:09 PM
To: weewx-user <weewx-user@googlegroups.com>
Subject: Re: [weewx-user] Noisy logging, log_success = False not followed

 

Sorry, Tom. This is due to a bug in how weewx configures the logger. The 
problem is that weewx does not convert strings to int when configuring.  It was 
fixed a couple weeks ago (commit  
<https://github.com/weewx/weewx/commit/6348741c64f55c5b2d34d9b9c70a5ed0b6d55c7f#diff-fd1112d5a28181a93b9b3e2e45e748ea>
 6348741), but I totally forgot about it.

 

You have two choices: 

1.   Replace your copy of weeutil/logger.py with the one in the repository 
<https://raw.githubusercontent.com/weewx/weewx/master/bin/weeutil/logger.py> , 
or 

2.   remove the integers from the configuration stanza. It becomes

[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

-tk

 

On Fri, May 15, 2020 at 3:58 PM Chris Nelson <cjncj...@gmail.com 
<mailto:cjncj...@gmail.com> > wrote:

Thinking out loud here...  Running as the Pi user?  Have write access to 
/var/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 weewx-user+unsubscr...@googlegroups.com 
<mailto:weewx-user%2bunsubscr...@googlegroups.com> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8fb4e590-c1f8-4220-beef-ab6e6baba964%40googlegroups.com.

-- 
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 
<mailto:weewx-user+unsubscr...@googlegroups.com> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAkF8DDP%3D5ahXooNr2KiSFzQbcLWKo2tU4Y4RQMb7f8yw%40mail.gmail.com
 
<https://groups.google.com/d/msgid/weewx-user/CAPq0zEAkF8DDP%3D5ahXooNr2KiSFzQbcLWKo2tU4Y4RQMb7f8yw%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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/08c501d632e7%24a27a3340%24e76e99c0%24%40gmail.com.

Reply via email to