[slf4j-user] RFC: slf4j-fluent

Matt Sicker boards at gmail.com
Wed Jan 9 17:26:30 CET 2019


On Wed, 9 Jan 2019 at 06:05, Federico Fissore <federico at 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 <boards at gmail.com>


More information about the slf4j-user mailing list