On Wed, 9 Jan 2019 at 06:05, Federico Fissore <feder...@fissore.org> wrote:
> ...
> its cost is not zero, as it creates a new object instance every time
> error/info/xxx methods are called, ...

Wouldn't escape analysis eventually cause inlining anyways? Garbage
may not be too big an issue there, especially since you've already got
null loggers for when it's disabled (though if you cache the level
logger like you suggested, then any reconfiguration of logging will
not be reflected).

Also, does this still work when caller location information is enabled
in log4j2 or logback?

-- 
Matt Sicker <boa...@gmail.com>
_______________________________________________
slf4j-user mailing list
slf4j-user@qos.ch
http://mailman.qos.ch/mailman/listinfo/slf4j-user

Reply via email to