marcpf commented on code in PR #42:
URL:
https://github.com/apache/sling-org-apache-sling-testing-clients/pull/42#discussion_r1087584053
##########
src/main/java/org/apache/sling/testing/clients/util/ServerErrorRetryStrategy.java:
##########
@@ -48,14 +50,15 @@ public boolean retryRequest(final HttpResponse response,
final int executionCoun
boolean needsRetry = executionCount <=
SystemPropertiesConfig.getHttpRetries() && responseRetryCondition(response,
expectedStatus);
if (SystemPropertiesConfig.isHttpLogRetries() && needsRetry &&
LOG.isWarnEnabled()) {
- LOG.warn("Request retry needed due to service unavailable
response");
- LOG.warn("Response headers contained:");
- Arrays.stream(response.getAllHeaders()).forEach(h ->
LOG.warn("Header {}:{}", h.getName(), h.getValue()));
+ 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));
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]