on 11-23-2016 2:15 PM
What is recommended
Logger.debug ("this is a debugging information")
if(LOGGER.isDebugEnabled()){ Logger.debug ("this is a debugging information") }
I am talking from the performance point of view . Would love your inputs on these.
if statements are not required anymore as slf4j has optimized this scenario.
Bad : Logger.debug ("This is a debugging information on object='" + object+ "'");
Good : Logger.debug ("This is a debugging information on object='{}'", object);
Ensure to follow the good pattern to avoid unnecessary string concatenations.
Reference : http://slf4j.org/faq.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.