MrModest / CommunityBot

2 stars 3 forks source link

Configure request/response body logging #21

Open MrModest opened 4 years ago

MrModest commented 4 years ago

probably with middleware

be aware with reading a stream (if you won't return position, you can lost body context in controller action or end response)

MrModest commented 4 years ago

Help links:

https://github.com/elanderson/ASP.NET-Core-Basics-Refresh/commit/c1b24de0d44dfc45d379b91d721842656c4ba3d8 https://itnext.io/log-requests-and-responses-in-asp-net-core-3-a1bebd49c996

https://gist.github.com/elanderson/c50b2107de8ee2ed856353dfed9168a2 - attention to comments

https://www.sulhome.com/blog/10/log-asp-net-core-request-and-response-using-middleware