Skip to content

Commit

Permalink
set log level to INFO (#373)
Browse files Browse the repository at this point in the history
* set log level to INFO

* isort
  • Loading branch information
peterdudfield authored Dec 22, 2024
1 parent 1d62a7a commit 5519975
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 3 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" Main FastAPI app """

import logging
import os
import time
from datetime import timedelta
Expand All @@ -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"),
Expand Down

0 comments on commit 5519975

Please sign in to comment.