The solution for this question is a custom project which I made which makes it possible to sanitize data from the logging.
See
- https://github.com/StefH/SanitizedHttpLogger
- https://www.nuget.org/packages/SanitizedHttpClientLogger
- https://www.nuget.org/packages/SanitizedHttpLogger
And see this blogpost for more explanation and details:
- https://mstack.nl/blogs/sanitize-http-logging/