On Sunday, May 17, 2020 at 12:01:15 PM UTC-7, Tom Keffer wrote:
>
> The default handler is SysLogHandler 
> <https://docs.python.org/3/library/logging.handlers.html#sysloghandler>, 
> which uses a socket to communicate with syslogd, but there are lots of 
> other handlers.
>
> How about RotatingFileHandler 
> <https://docs.python.org/3/library/logging.handlers.html#rotatingfilehandler>?
>  
> Instructions are in the WeeWX wiki 
> <https://github.com/weewx/weewx/wiki/WeeWX-v4-and-logging#logging-to-rotating-files>.
>  
> NB: there is a bug in the WeeWX logging facility that prevents this handler 
> from working if you specify options maxBytes and backupCount. If you want 
> to use RotatingFileHandler, either avoid these two options, or use the 
> patched weeutil.logger 
> <https://raw.githubusercontent.com/weewx/weewx/master/bin/weeutil/logger.py>
>  module.
>
>>
>>
No difference.  I grabbed the patched module from your link.  Still all 
kinds of barfing about syslog sockets no matter what I do.

Does 'disable_existing_loggers' work ?  I can't see any difference in 
effect regardless of True/False or unspecified.
What I'm looking is to disable all loggers that are built-in, and log only 
to the console (for a container this makes most sense to me).

Here's the weewx.conf settings I'm failing with currently...


[Logging]
    version = 1
    disable_existing_loggers = True

    [[loggers]]
        [[[root]]]
           # the trailing comma here seems required 

           handlers = console,

    [[handlers]]
        [[[console]]]
          level = DEBUG
          formatter = verbose
          class = logging.StreamHandler
          # Alternate choice is 'ext://sys.stderr'
          stream = ext://sys.stdout
 

-- 
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/2e9d6f6b-9324-46b3-815b-f4dbde3f7df7%40googlegroups.com.

Reply via email to