Skip to content

Commit

Permalink
Merge pull request #1528 from BoostryJP/fix/suppress-web3-req-logger
Browse files Browse the repository at this point in the history
Suppress error logs raised by web3 module
  • Loading branch information
YoshihitoAso authored Jun 24, 2024
2 parents f992c91 + 585524a commit 6e706e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
logging.getLogger("httpx").setLevel(logging.WARNING)
logging.getLogger("httpcore").setLevel(logging.WARNING)

logging.getLogger("web3.manager.RequestManager").propagate = False
logging.getLogger("web3.manager.RequestManager").addHandler(logging.NullHandler())

if config.APP_ENV == "live":
stream_handler = logging.StreamHandler(open(config.APP_LOGFILE, "a"))
formatter = logging.Formatter(
Expand Down

0 comments on commit 6e706e2

Please sign in to comment.