sodonnel commented on code in PR #4169:
URL: https://github.com/apache/ozone/pull/4169#discussion_r1066777565


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainerCheck.java:
##########
@@ -401,6 +401,6 @@ private void handleCorruption(IOException e) {
     String errStr =
         "Corruption detected in container: [" + containerID + "] ";
     String logMessage = errStr + "Exception: [" + e.getMessage() + "]";
-    LOG.error(logMessage);
+    LOG.error(logMessage, e);

Review Comment:
   You could clean this up further by removing the two intermediate strings:
   
   ```
   LOG.error("Corruption detected in container: [{}]. Exception: {}", 
containerID, e.getMessage, e);
   ```
   
   Does logging the full stack trace via the last exception parameter not also 
log the e.getMessage() too?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to