From c643961c3246253207179587c1e864a0e56c119f Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Sun, 22 Dec 2024 21:11:18 +0000 Subject: [PATCH] set log level to INFO --- src/database.py | 2 +- src/main.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/database.py b/src/database.py index 472810ba..bb778216 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 3d0847cb..9d3408bb 100644 --- a/src/main.py +++ b/src/main.py @@ -4,6 +4,7 @@ import time from datetime import timedelta +import logging import sentry_sdk import structlog from fastapi import FastAPI, Request @@ -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"),