Skip to content

Commit

Permalink
chore: better logging config + suppress asyncio spam
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Nov 11, 2024
1 parent 6e3ad27 commit 7e83152
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bento_wes/logger.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import logging
import os

from bento_lib.logging import log_level_from_str

__all__ = [
"logger",
]

logging.basicConfig(level=logging.DEBUG)
logging.basicConfig(level=logging.NOTSET)

# Suppress asyncio debug logs
logging.getLogger("asyncio").setLevel(logging.INFO)

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.setLevel(log_level_from_str(os.environ.get("LOG_LEVEL", "info").lower().strip()))

0 comments on commit 7e83152

Please sign in to comment.