fix logger
This commit is contained in:
parent
3f01443b7c
commit
fc0ceec83d
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
import logging
|
||||
import os
|
||||
|
||||
logger = logging.getLogger("uvicorn.error")
|
||||
logger.setLevel(os.getenv("LOG_LEVEL") or logging.INFO)
|
||||
if len(logger.handlers) == 0:
|
||||
logger.addHandler(logging.StreamHandler())
|
||||
|
|
Loading…
Add table
Reference in a new issue