My apologies. The layout of the configuration dictionary changed, and I
have not had a chance to update the Wiki. The change makes it more
consistent with the Python docs. You want:
[Logging]
# Root logger
[[root]]
handlers = rotate,
[[loggers]]
[[handlers]]
# Log to a set of rotating files
[[[rotate]]]
level = DEBUG
formatter = verbose
class = logging.handlers.RotatingFileHandler
filename = /var/log/weewx.log
The difference is that the root logger, [[root]], is now a peer, instead of
a child, of [[loggers]].
V4.1.0 can now handle the integer options maxBytes and backupCount, if you
want to put them back in.
-tk
On Mon, May 25, 2020 at 3:55 PM <[email protected]> wrote:
> 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:* [email protected] <[email protected]> *On
> Behalf Of *Tom Keffer
> *Sent:* Friday, May 15, 2020 7:09 PM
> *To:* weewx-user <[email protected]>
> *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 6348741
> <https://github.com/weewx/weewx/commit/6348741c64f55c5b2d34d9b9c70a5ed0b6d55c7f#diff-fd1112d5a28181a93b9b3e2e45e748ea>),
> 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 <[email protected]> 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 [email protected].
> 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 [email protected].
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/08c501d632e7%24a27a3340%24e76e99c0%24%40gmail.com
> <https://groups.google.com/d/msgid/weewx-user/08c501d632e7%24a27a3340%24e76e99c0%24%40gmail.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/CAPq0zECPvYKTQJ%3D7On3wWHjOTF1ytc9_n6_6tiBSrKdfh8T8NA%40mail.gmail.com.