-
Notifications
You must be signed in to change notification settings - Fork 27
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
SLING-11748 - Improve logging output of HTTP retries in testing clients #42
Conversation
src/main/java/org/apache/sling/testing/clients/util/ServerErrorRetryStrategy.java
Outdated
Show resolved
Hide resolved
- replace wrapper.toString()
LOG.warn("Request retry condition met: [count={}/{}], [expected-codes={}], [retry-codes={}]", | ||
executionCount, SystemPropertiesConfig.getHttpRetries(), expectedStatus, SystemPropertiesConfig.getHttpRetriesErrorCodes()); | ||
LOG.warn("Request: {}", getRequestDetails(context)); | ||
LOG.warn("Response: {}", getResponseDetails(response)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do write out this information in 3 distinct log messages? I would prefer a single log message, which is then much easier to capture than 3 subsequent messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @joerghoh. I think 3 log lines is a good middle way. We had a log line per request/response header before. I as well think its easier to deal with in Splunk queries.
src/main/java/org/apache/sling/testing/clients/util/ServerErrorRetryStrategy.java
Outdated
Show resolved
Hide resolved
- wrap lines at 120 characters
Kudos, SonarCloud Quality Gate passed! |
I assume silent consensus so merging :) |
https://issues.apache.org/jira/browse/SLING-11748
Proposal for improving the HTTP retry log output in the testing clients.
Current Output (from unit test):
Proposed output with this PR (from unit test):