feat: add database debug env var (#2333)

* feat: add database debug env var
makes it visible what db actions happen
This commit is contained in:
dni ⚡
2024-03-21 09:59:17 +01:00
committed by GitHub
parent e4d3faefa0
commit 17839f6a25
4 changed files with 11 additions and 1 deletions
+6
View File
@@ -579,6 +579,12 @@ def configure_logger() -> None:
logging.getLogger("uvicorn.error").handlers = [InterceptHandler()]
logging.getLogger("uvicorn.error").propagate = False
logging.getLogger("sqlalchemy").handlers = [InterceptHandler()]
logging.getLogger("sqlalchemy.engine.base").handlers = [InterceptHandler()]
logging.getLogger("sqlalchemy.engine.base").propagate = False
logging.getLogger("sqlalchemy.engine.base.Engine").handlers = [InterceptHandler()]
logging.getLogger("sqlalchemy.engine.base.Engine").propagate = False
class Formatter:
def __init__(self):