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 2022/02/28 11:30:05 UTC

[GitHub] [ozone] sodonnel commented on a change in pull request #3143: HDDS-6381 add some dubug logs in ByteBufferEncodingState

sodonnel commented on a change in pull request #3143:
URL: https://github.com/apache/ozone/pull/3143#discussion_r815803317



##########
File path: hadoop-hdds/erasurecode/src/main/java/org/apache/ozone/erasurecode/rawcoder/ByteBufferEncodingState.java
##########
@@ -97,6 +101,9 @@ void checkBuffers(ByteBuffer[] buffers) {
       }
 
       if (buffer.remaining() != encodeLength) {
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("buffer remaining is " + buffer.remaining() + " encodelength is " + encodeLength);

Review comment:
       Please use the placeholder syntax for adding values into log messages, eg:
   
   ```
   LOG.debug("buffer remaining is {} encodelength is {}", buffer.remaining(), encodeLength);
   ```
   Also, when the parameters to the log message are simple ones, like above, then you do not need to wrap the `LOG.debug` call in `if (LOG.isDebugEnabled())`, as that happens already inside the Logger code. Therefore please also remove the IF statement surrounding the `LOG.debug` call.




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