Forum Discussion

alita535_138347's avatar
alita535_138347
Icon for Nimbostratus rankNimbostratus
Mar 07, 2014

Bigsuds Logging, how do i turn it off

i have bigsuds working within a async web framework with kombu and rabbit mq. To handle errors i've got a significant level of logging going on. BIGSUDS seems to want to log the entire WSDL. I want to turn it off but i don't see any obvious documentation here to do so.

 

1 Reply

  • This issue isn't specific to bigsuds, it's general use of the Python Logging library, though I'm still surprised none of the samples here do it. bigsuds uses the Python standard

    logging
    library; if you're seeing the messages, it's probably because you have a debug-level log handler defined somewhere in your application.

    The following will silently suppress any log messages from

    bigsuds
    and the underlying
    suds
    library that are below the
    WARNING
    level. Place this in the file where you import
    bigsuds
    , right after the bigsuds import line.

    import logging
     suppress suds internal logging                                 
    suds_log = logging.getLogger("suds")
    suds_log.setLevel(logging.WARNING)
    suds_log.propagate = True
     suppress bigsuds internal logging
    bigsuds_log = logging.getLogger("bigsuds")
    bigsuds_log.setLevel(logging.WARNING)
    bigsuds_log.propagate = True