allow disabling logging silencing
This commit is contained in:
parent
5a0070957f
commit
fae8edb043
1 changed files with 4 additions and 3 deletions
|
@ -44,9 +44,10 @@ logging.basicConfig(
|
|||
format="%(asctime)s:%(levelname)s:%(name)s:%(message)s",
|
||||
datefmt="%d/%m/%Y %H:%M:%S"
|
||||
)
|
||||
logging.getLogger("httpcore.connection").setLevel(logging.INFO)
|
||||
logging.getLogger("httpcore.http11").setLevel(logging.INFO)
|
||||
logging.getLogger("httpx").setLevel(logging.INFO)
|
||||
if os.getenv("LOG_DEBUG_TIDY") != "1":
|
||||
logging.getLogger("httpcore.connection").setLevel(logging.INFO)
|
||||
logging.getLogger("httpcore.http11").setLevel(logging.INFO)
|
||||
logging.getLogger("httpx").setLevel(logging.INFO)
|
||||
app = fastapi.FastAPI(
|
||||
root_path=os.environ.get("PREVIEW_ROOT_PATH", ""),
|
||||
lifespan=startup
|
||||
|
|
Loading…
Reference in a new issue