Skip to content

Commit

Permalink
less spammy logs in prd
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all committed Sep 22, 2023
1 parent 3367764 commit b747c46
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/core/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
import sys
import warnings

from .config import settings
# # log formatting
formatter = logging.Formatter(
json.dumps(
Expand Down Expand Up @@ -30,10 +30,11 @@
logging.getLogger("aiomysql").setLevel(logging.ERROR)
logging.getLogger("aiokafka").setLevel(logging.WARNING)

# uvicorn_error = logging.getLogger("uvicorn.error")
# uvicorn_error.disabled = True
# uvicorn_access = logging.getLogger("uvicorn.access")
# uvicorn_access.disabled = True
if settings.ENV == "PRD":
uvicorn_error = logging.getLogger("uvicorn.error")
uvicorn_error.disabled = True
uvicorn_access = logging.getLogger("uvicorn.access")
uvicorn_access.disabled = True

# https://github.com/aio-libs/aiomysql/issues/103
# https://github.com/coleifer/peewee/issues/2229
Expand Down

0 comments on commit b747c46

Please sign in to comment.