Merged
Conversation
jimmyjames
commented
Jan 12, 2022
| logging.redactHeader(header); | ||
| } | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Yes, unfortunately this (and all other networking client config) is copy-paste between the Auth and Management API clients :(. Given the current package structure, extracting it to a common ancestor or utility class would require exposing public methods and dependencies (e.g., OkHttp) that we do not wish to do.
d74ae20 to
7289274
Compare
poovamraj
approved these changes
Jan 18, 2022
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, logging of HTTP request/response information is only enabled through the
setLoggingEnabled(boolean enabled)method on theManagementAPIandAuthAPIAPI clients. While this does allow for enabling or disabling logging (disabled by default), as discussed in #389 the configurability of the logging can be improved.This PR adds a new configuration point to our existing
HttpOptionsconfig object. It does so by exposing a new method,HttpOptions#setLoggingOptions(LoggingOptions loggingOptions).The
LoggingOptionsclass exposes the ability to customize the logging level to any of OkHttp's supported levels, as well as the ability to specify headers that should be redacted from the logs (it does not expose any of the OkHttp functionality publicly).A follow-up PR will be made to deprecate the existing
setLoggingEnabledin favor of this new customization point.