You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2023/01/11 09:44:00 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #4169: HDDS-7097. Container scanner log output lacks useful information

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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org