> From: Berin Loritsch [mailto:[EMAIL PROTECTED]

> To be honest, I think we are overthinking this a bit.  Very
> rarely does the
> logging levels change at runtime.  In fact many logging toolkits cache the
> log level as a final variable to help the JIT inline and optimize out the
> whole block.
>

Consider this as very aggressive caching :-)

> In every project I have worked on, the logging levels remained
> constant from
> component init time to destruction.  The only time a logging
> level could or
> would change is if the change was detected when the component was
> reloaded.
> Effectively, in most cases this meant that the whole system came
> down before
> the configuration would change.
>

Very common, especially in development situations. However, in zero-downtime
production environments, changing the log level on the fly avoids the need
for an outage to diagnose a operational problem (which naturally refuses to
show up in stage/test).

> Why add more difficulty to a simple solution?
>
> The isXEnabled() methods are fast, and are usually quicker than one
> concatenation.

We moved beyond the concatenation issue to a "do-we-cache-the-guard" issue.

--
Jeremy

Reply via email to