diff options
author | Daniel Trebbien <dtrebbien@gmail.com> | 2017-10-09 10:14:34 -0500 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-10-10 13:28:44 +0200 |
commit | 0c4ab610218ff4b7532cd6483dee150f78c1fd3e (patch) | |
tree | 4a30a5b3c92702544b09ac7e909e566f988710cc /sonar-plugin-api/src | |
parent | 1719abc62d33568dfc1a1d8d90262062211c5f39 (diff) | |
download | sonarqube-0c4ab610218ff4b7532cd6483dee150f78c1fd3e.tar.gz sonarqube-0c4ab610218ff4b7532cd6483dee150f78c1fd3e.zip |
Utilize parameterized logging
As suggested in the SLF4J FAQ:
https://www.slf4j.org/faq.html#logging_performance
.. parameterized logging can improve the efficiency of logger calls when
logging at the specified level is disabled.
In addition, per the FAQ: https://www.slf4j.org/faq.html#paramException
since SLF4J 1.6.0 it is possible to use parameterized logging and also
log an exception/throwable.
These changes were suggested by SLF4J Helper for NetBeans IDE:
http://plugins.netbeans.org/plugin/72557/
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java index 7de4c84994d..efe9fc38e73 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java @@ -57,7 +57,7 @@ public class TimeProfiler { if (debug) { logger.debug("%s ...", name); } else { - logger.info(name + "..."); + logger.info("{}...", name); } return this; } |