Doug Cutting (JIRA) wrote:
>> this patch in some places removes the log guards
>
> Most of the log guards are misguided. Log guards
should only be used on DEBUG level messages in
performance-critical inner loops. Since INFO is the
expected log level, a guard on INFO & WARN level
messages does not improve performance, since these will be
shown. And most DEBUG-level messages are not in performance
critical code and hence do not need guards. The guards only
make the code bigger and thus harder to read and maintain.
In particular, in all places where we check isWarnEnabled(),
isFatalEnabled() and isInfoEnabled(), the 'if' should be
removed. All
calls to isDebugEnabled() should be reviewed, and most
should be removed.
These guards were all introduced by a patch some time ago.
I complained
at the time and it was promised that this would be repaired,
but it has
not yet been.
Doug
|