joerghoh commented on code in PR #42:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-clients/pull/42#discussion_r1073366762


##########
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:
   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.



-- 
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: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to