Skip to content

Commit

Permalink
refactor(main): enhance logging configuration
Browse files Browse the repository at this point in the history
- set logging level to CRITICAL for httpcore and http11
- prevent propagation of httpcore and http11 logs
  • Loading branch information
awwaawwa committed Jan 20, 2025
1 parent 2ffbb05 commit 45a71ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions yadt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ def main():
logging.getLogger("httpx").propagate = False
logging.getLogger("openai").setLevel("CRITICAL")
logging.getLogger("openai").propagate = False
logging.getLogger("httpcore").setLevel("CRITICAL")
logging.getLogger("httpcore").propagate = False
logging.getLogger("http11").setLevel("CRITICAL")
logging.getLogger("http11").propagate = False
for v in logging.Logger.manager.loggerDict.values():
if getattr(v, "name", None) is None:
continue
Expand Down

0 comments on commit 45a71ae

Please sign in to comment.