Skip to content

Commit

Permalink
Log request as string
Browse files Browse the repository at this point in the history
  • Loading branch information
raimannma committed Feb 11, 2025
1 parent bc65a72 commit 07cdeb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deadlock_data_api/logging_middleware.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import logging
import time
from collections.abc import Callable
Expand Down Expand Up @@ -27,7 +28,7 @@ async def dispatch(self, req: Request, call_next: Callable) -> Response:
self._logger.exception(e)
raise

self._logger.info(logging_dict)
self._logger.info(json.dumps(logging_dict))
return res

async def _log_request(self, req: Request) -> dict[str, Any]:
Expand Down

0 comments on commit 07cdeb6

Please sign in to comment.