mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2025-03-15 09:50:20 +08:00
fix logger
This commit is contained in:
parent
3f01443b7c
commit
fc0ceec83d
@ -1,3 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
logger = logging.getLogger("uvicorn.error")
|
logger = logging.getLogger("uvicorn.error")
|
||||||
|
logger.setLevel(os.getenv("LOG_LEVEL") or logging.INFO)
|
||||||
|
if len(logger.handlers) == 0:
|
||||||
|
logger.addHandler(logging.StreamHandler())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user