Skip to content

Commit

Permalink
refactor(main): add critical logging level for openai
Browse files Browse the repository at this point in the history
- set logging level to CRITICAL for openai
- prevent propagation of openai logs
  • Loading branch information
awwaawwa committed Jan 20, 2025
1 parent 94708e9 commit eb92116
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yadt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ def main():

logging.getLogger("httpx").setLevel("CRITICAL")
logging.getLogger("httpx").propagate = False
logging.getLogger("openai").setLevel("CRITICAL")
logging.getLogger("openai").propagate = False
for v in logging.Logger.manager.loggerDict.values():
if getattr(v, "name", None) is None:
continue
Expand Down

0 comments on commit eb92116

Please sign in to comment.