[ https://issues.apache.org/jira/browse/BOOKKEEPER-1090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033782#comment-16033782 ]
ASF GitHub Bot commented on BOOKKEEPER-1090: -------------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/bookkeeper/pull/179 > Use LOG.isDebugEnabled() to avoid unexpected allocations > -------------------------------------------------------- > > Key: BOOKKEEPER-1090 > URL: https://issues.apache.org/jira/browse/BOOKKEEPER-1090 > Project: Bookkeeper > Issue Type: Improvement > Reporter: Matteo Merli > Assignee: Matteo Merli > Priority: Minor > Fix For: 4.5.0 > > > Using {{LOG.debug(...)}} can lead to multiple unexpected memory allocation, > even when the logger it's turned off. > For example, {{int}} and {{long}} parameter are boxed into {{Integer}} and > {{Long}} objects and the var-arg parameters are using an {{Object[]}} to hold > them. > We should guard all usages of {{LOG.debug()}} with the {{if > (LOG.isDebugEnabled()}} guard. -- This message was sent by Atlassian JIRA (v6.3.15#6346)