Skip to content

Commit

Permalink
Suppress error logs raised by web3 module
Browse files Browse the repository at this point in the history
  • Loading branch information
purplesmoke05 committed Jun 24, 2024
1 parent 399980a commit 585524a
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 585524a

Please sign in to comment.