In the given example, the log message is a constant string, so letting the
logger discard it is just as efficient as checking whether the logger is
enabled, and it lowers the complexity of the code because there are fewer
branches.
However it is worth adding the log.isDebugEnabled() in case
Hi Devs,
I have seen most of the code in the WSO2 code repo is making use
of log.isDebugEnabled() [1] every time before it debug log.
Why do not we introduce a instance variable and make use of that variable
to check the debug flag?
[1]
if (*log.isDebugEnabled()*) {
log.debug(Log XX);
Yes, but it won't improve the performance a great deal
On Aug 27, 2015 5:21 AM, Vanjikumaran Sivajothy va...@wso2.com wrote:
Hi Devs,
I have seen most of the code in the WSO2 code repo is making use
of log.isDebugEnabled() [1] every time before it debug log.
Why do not we introduce a