Re:A new log4j 2.0
by politician on Thursday December 06, 2012 @11:11AM
(#4882276)
In the original code, the debug call is guarded by a condition:
But in the new code, the calls to expensiveOp and debugModeOnlyOp will be called every time this sequence of code is run regardless of the condition:
which is equivalent to the old code:
In most languages that do not support macros, it's impossible to correctly state the dependency of expensiveOp & debugModeOnlyOp on the log.isDebugEnabled() flag using log4j's new API.
[ Parent
| on HN ]
There are no comments on this comment yet.