Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
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.
logger.debug("The new entry is "+entry+"."); logger.debug("The new entry is {}.", entry);
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.
Attachments
Issue Links
- duplicates
-
ACCUMULO-3652 Remove string concatenation in log statements where slf4j is used.
- Resolved