You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/05/23 10:58:27 UTC

[GitHub] [hive] pgaref commented on pull request #2310: HIVE-25152: Remove Superfluous Logging Code

pgaref commented on pull request #2310:
URL: https://github.com/apache/hive/pull/2310#issuecomment-846543650


   > ... continued...
   > 
   > That is to say:
   > 
   > ```java
   > LOG.info("New Final Path: FS " + fsp.finalPaths[filesIdx]);
   > LOG.info("New Final Path: FS {}", fsp.finalPaths[filesIdx]);
   > ```
   > 
   > These two statements, will always produce the same output (as INFO is on by default in every production environment under the sun). However, the second one will always have the overhead of having to find the anchor in the format string and then replace it with the value. The first example, there is simply a string concatenation that occurs. This will be faster and I don't find this log particularly hard to read.
   
   Hey @belugabehr thanks for the details! I agree adding anchors on all INFO statements wont add and perf value here considering that INFO is the default log lvl -- I was mostly thinking consistency when posting the comments, eventually using a single logging style but maybe thats out of the scope of this PR.
   
   Happy to +1 as is and maybe discuss this as part of a new ticket


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org