You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Christopher Tubbs (JIRA)" <ji...@apache.org> on 2017/06/10 16:08:19 UTC

[jira] [Resolved] (ACCUMULO-4650) Use SLF4J parameterized logging instead of String concatenation

     [ https://issues.apache.org/jira/browse/ACCUMULO-4650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Tubbs resolved ACCUMULO-4650.
-----------------------------------------
    Resolution: Duplicate

Closing as duplicate. Recommend this work pick up from the previous patch or pull request (https://github.com/apache/accumulo/pull/32). That work is quite stale, and may need to be redone, if it's too far out-of-date or incomplete.

> Use SLF4J parameterized logging instead of String concatenation
> ---------------------------------------------------------------
>
>                 Key: ACCUMULO-4650
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4650
>             Project: Accumulo
>          Issue Type: Improvement
>            Reporter: Michael Miller
>            Priority: Minor
>
> The Simple Logging Facade for Java (SLF4J) allows performance improvement of logging with use of parameterized "{}" log messages.  
> The following two lines will yield the exact same output. However, the second form will outperform the first form by a factor of at least 30, in case of a disabled logging statement.
> {code}
> logger.debug("The new entry is "+entry+".");
> logger.debug("The new entry is {}.", entry);
> {code}
> See here for reference: https://www.slf4j.org/faq.html#logging_performance
> It wouldn't hurt to wrap all debug log statements server side with isDebugEnabled() as well.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)