New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add responseCauseSanitizer
to LoggingDecoratorBuilder
#1594
Conversation
Motivation: A user wants to sanitize the stack trace of `RequestLog.responseCause()` or avoid logging the stack trace completely. Modifications: - Added LoggingDecoratorBuilder.responseCauseSanitizer()` and applied the specified `Function` to the response cause. - Widened the type parameters of sanitizer functions. - Miscellaneous: - Fixed a bug where a response content sanitizer is applied on request content on a certain case. - Added `contentSanitizer()` and `headersSanitizer()` shortcut methods. - Javadoc clean-up Result: - A user can sanitize/drop the stack trace of `RequestLog.responseCause()`. - Fixes line#1592 - Request content is always sanitized with an intended sanitizer. - More shortcut methods in `LoggingClientBuilder` and `LoggingServiceBuilder`.
@anuraaga I found we do not log |
Codecov Report
@@ Coverage Diff @@
## master #1594 +/- ##
=========================================
Coverage ? 72.82%
Complexity ? 7574
=========================================
Files ? 699
Lines ? 30459
Branches ? 3712
=========================================
Hits ? 22182
Misses ? 6369
Partials ? 1908
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #1594 +/- ##
=========================================
Coverage ? 72.82%
Complexity ? 7574
=========================================
Files ? 699
Lines ? 30459
Branches ? 3712
=========================================
Hits ? 22182
Misses ? 6369
Partials ? 1908
Continue to review full report at Codecov.
|
Hmm - I don't know if I've ever thought of the existence of request cause. Any request exception would probably be logged in the response itself so it seems likely to double-log if the request cause was logged. |
Yeah. That's probably why. Let me keep it this way then. Thanks for a reply. |
Thanks for reviewing :-) |
Motivation: A user wants to sanitize the stack trace of `RequestLog.responseCause()` or avoid logging the stack trace completely. Modifications: - Added LoggingDecoratorBuilder.responseCauseSanitizer()` and applied the specified `Function` to the response cause. - Widened the type parameters of sanitizer functions. - Miscellaneous: - Fixed a bug where a response content sanitizer is applied on request content on a certain case. - Added `contentSanitizer()` and `headersSanitizer()` shortcut methods. - Javadoc clean-up Result: - A user can sanitize/drop the stack trace of `RequestLog.responseCause()`. - Request content is always sanitized with an intended sanitizer. - More shortcut methods in `LoggingClientBuilder` and `LoggingServiceBuilder`.
Motivation:
A user wants to sanitize the stack trace of
RequestLog.responseCause()
or avoid logging the stack trace completely.
Modifications:
and applied the specified
Function` to the response cause.content on a certain case.
contentSanitizer()
andheadersSanitizer()
shortcut methods.Result:
RequestLog.responseCause()
.LoggingClientBuilder
andLoggingServiceBuilder
.