Skip to content

Commit

Permalink
Merge pull request #31 from Aksem/feature/web_aiohttp
Browse files Browse the repository at this point in the history
Add default serializer for json in logs
  • Loading branch information
Aksem authored Oct 22, 2024
2 parents 15cb7d2 + b2ed93b commit 0577350
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modapp/base_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def got_request(
logger.opt(lazy=True).debug(
f"Request to {route.path}: {{request_data}}",
request_data=lambda: json.dumps(
request_data.to_dict(), indent=4, ensure_ascii=False
request_data.to_dict(), indent=4, ensure_ascii=False, default=str
),
)

Expand All @@ -87,7 +87,7 @@ async def got_request(
logger.opt(lazy=True).debug(
f"Response on {route.path}: {{reply_str}}",
reply_str=lambda: json.dumps(
reply.to_dict(), indent=4, ensure_ascii=False
reply.to_dict(), indent=4, ensure_ascii=False, default=str
),
)
return proto_reply
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "modapp"
version = "0.3.21"
version = "0.3.22"
description = ""
authors = ["Vladyslav Hnatiuk <vhnatiuk@ukr.net>"]
license = "MIT"
Expand Down

0 comments on commit 0577350

Please sign in to comment.