diff --git a/src/database.py b/src/database.py index 472810b..bb77821 100644 --- a/src/database.py +++ b/src/database.py @@ -64,7 +64,7 @@ def get_connection(): """ db_url = os.getenv("DB_URL") if db_url and db_url.find("postgresql") != -1: - return DatabaseConnection(url=db_url) + return DatabaseConnection(url=db_url, echo=False) else: return DummyDBConnection() diff --git a/src/main.py b/src/main.py index 3d0847c..1ff6e04 100644 --- a/src/main.py +++ b/src/main.py @@ -1,5 +1,6 @@ """ Main FastAPI app """ +import logging import os import time from datetime import timedelta @@ -22,6 +23,8 @@ # flake8: noqa E501 +logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO")) + structlog.configure( processors=[ structlog.processors.EventRenamer("message", replace_by="_event"),