Skip to content

Commit

Permalink
ignore aiohttp warnings for normal level use-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
isidentical committed May 5, 2021
1 parent 3186760 commit 748c470
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dvc/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,17 @@ def disable_other_loggers():

def setup(level=logging.INFO):
colorama.init()
logging.getLogger("asyncio").setLevel(logging.CRITICAL)

if level >= logging.DEBUG:
# Unclosed session errors for asyncio/aiohttp are only available
# on the tracing mode for extensive debug purposes. They are really
# noisy, and this is potentially somewhere in the client library
# not managing their own session. Even though it is the best practice
# for them to do so, we can be assured that these errors raised when
# the object is getting deallocated, so no need to take any extensive
# action.
logging.getLogger("asyncio").setLevel(logging.CRITICAL)
logging.getLogger("aiohttp").setLevel(logging.CRITICAL)

addLoggingLevel("TRACE", logging.DEBUG - 5)
logging.config.dictConfig(
Expand Down

0 comments on commit 748c470

Please sign in to comment.