For my docker configuration for my weewx weatherstation, I add this
configuration right after the version = x.x.x line. Give it a couple of
empty lines to separate it out

###################################################
[Logging]
    version = 1
    disable_existing_loggers = False

    # Root logger
    [[root]]
      level = {log_level}
      handlers = console,

    # Additional loggers would go in the following section. This is useful
for tailoring logging
    # for individual modules.
    [[loggers]]

    # Definitions of possible logging destinations
    [[handlers]]

        # Log to a set of rotating files
        [[[rotate]]]
            level = DEBUG
            formatter = standard
            class = logging.handlers.RotatingFileHandler
            filename = /var/log/weewx.log
            maxBytes = 10000000
            backupCount = 4

        # Log to console
        [[[console]]]
            level = INFO
            formatter = standard
            class = logging.StreamHandler
            # Alternate choice is 'ext://sys.stderr'
            stream = ext://sys.stdout

    # How to format log messages
    [[formatters]]
        [[[simple]]]
            format = "%(levelname)s %(message)s"
        [[[standard]]]
            format = "%(asctime)s  {process_name}[%(process)d]
%(levelname)s %(name)s: %(message)s"
            # Format to use for dates and times:
            datefmt = %Y-%m-%d %H:%M:%S
        [[[verbose]]]
            format = "%(asctime)s  {process_name}[%(process)d]
%(levelname)s %(name)s: %(message)s"
            # Format to use for dates and times:
            datefmt = %Y-%m-%d %H:%M:%S

##############################################################################




On Tue, Nov 22, 2022 at 8:07 AM Tom Keffer <tkef...@gmail.com> wrote:

> StdPrint is sending messages directly to stdout via print() statements ---
> the logging facility is not involved at all. So, no, I would not expect
> that to work.
>
> Doug is using a log handler that sends log messages to "console," that is,
> stdout. So, what you're looking at is a mixture of print() statements and
> logging messages.
>
> Hope that helps.
>
>
>
> On Mon, Nov 21, 2022 at 5:09 PM vince <vinceska...@gmail.com> wrote:
>
>> Sorry for the late reply.  Rebuilding/consolidating my docker setups and
>> had a question...
>>
>> Removing StdPrint 'does' work for suppressing the LOOP messages in
>> Docker, but is there a way to get the same effect via a custom [Logging]
>> stanza ?
>>
>> I got very lost under the hood trying to follow how StdPrint is logging
>> at all.
>> Would this be expected to work ?
>>
>> [Logging]
>>     [[loggers]]
>>         [[[weewx.engine.StdPrint]]]
>>             level = ERROR
>>
>>
>> On Sunday, March 27, 2022 at 4:28:52 AM UTC-7 Tom Keffer wrote:
>>
>>> Just remove "StdPrint" from the list of reporting services to be run.
>>> So, this
>>>
>>> report_services = weewx.engine.StdPrint, weewx.engine.StdReport
>>>
>>> becomes this
>>>
>>> report_services = weewx.engine.StdReport
>>>
>>>
>>> On Sun, Mar 27, 2022 at 4:24 AM Doug Jenkins <do...@dougjenkins.com>
>>> wrote:
>>>
>>>> Is there a way to suppress the LOOP data?
>>>>
>>> --
>> 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/d1e72f8a-5a6d-4a90-8df5-4722c38a544dn%40googlegroups.com
>> <https://groups.google.com/d/msgid/weewx-user/d1e72f8a-5a6d-4a90-8df5-4722c38a544dn%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 weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/CAPq0zEA29dW4XRmKj4pB2k9xTXNHJ3n%2B8Dypsv4etjzCe%3Dg6ZQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEA29dW4XRmKj4pB2k9xTXNHJ3n%2B8Dypsv4etjzCe%3Dg6ZQ%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/CACC0i0zyMcHY4WXM_Q20tsYJhN0KbDqEo9%3DoobkLP6RB3xH%3DRg%40mail.gmail.com.

Reply via email to