List Info

Thread: log guards




log guards
country flaguser name
United States
2007-02-13 12:47:39
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

Re: log guards
user name
2007-02-13 13:17:39
> 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.

Yes, Sorry Doug that's my own fault....
I really don't have time to fix this   :-(

Best regards

Jérôme
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )