Skip to content

Commit

Permalink
Merge pull request #459 from geoadmin/bug-PB-932-log
Browse files Browse the repository at this point in the history
PB-932: Avoid UTF-8 truncation in logging
  • Loading branch information
ltshb authored Sep 16, 2024
2 parents a6bdf49 + 67a0b8e commit 674b1ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/middleware/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __call__(self, request):
] and request.content_type == "application/json" and not request.path.startswith(
'/api/stac/admin'
):
extra["request.payload"] = request.body[:200].decode()
extra["request.payload"] = request.body.decode()[:200]

logger.debug(
"Request %s %s?%s",
Expand Down

0 comments on commit 674b1ab

Please sign in to comment.