Skip to content

Commit

Permalink
feat: update logging config
Browse files Browse the repository at this point in the history
  • Loading branch information
zubkovmd committed Mar 19, 2024
1 parent d336595 commit 22747bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from prometheus_fastapi_instrumentator import Instrumentator
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
from uvicorn.config import LOGGING_CONFIG

from app.api.admin import create_admin
from app.api.routes.root import router
Expand All @@ -27,6 +28,8 @@
traces_sample_rate=1.0,
)

LOGGING_CONFIG["formatters"]["default"]["fmt"] = "%(asctime)s [%(name)s] %(levelprefix)s %(message)s"

app = fastapi.FastAPI()


Expand Down
3 changes: 0 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@

import uvicorn

from uvicorn.config import LOGGING_CONFIG

from app.api.app import app

LOGGING_CONFIG["formatters"]["default"]["fmt"] = "%(asctime)s [%(name)s] %(levelprefix)s %(message)s"

if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)

0 comments on commit 22747bd

Please sign in to comment.