Couldn't he just cache the LoggerContext and use LoggerContext.getLogger()
to avoid the ContextSelector lookup?

On 15 April 2016 at 08:19, Ralph Goers <[email protected]> wrote:

> The logging implementation stores the logger in a map.  However, when you
> call getLogger ClassLoaderContextSelector will have to locate the
> ClassLoader for the class loading the Logger. This can be fairly expensive.
> If you are using a different ContextSelector it might work better. Or you
> can create a Map of the Loggers yourself.
>
> Ralph
>
> > On Apr 15, 2016, at 2:02 AM, Jochen Wiedmann <[email protected]>
> wrote:
> >
> > Hi,
> >
> > I've got an application, where I would like to obtain loggers on the
> > fly, because the logger name isn't known in advance. (Think of it as a
> > logging server, which will be used by remote clients.)
> >
> > Now, creating a Logger might be an expensive operation. Thus, my
> question:
> >
> > - Would you recommend to always invoke LogManager.getLogger(String)
> > and use the result?
> > - Or would it be better to maintain a Map<String,Logger> with the
> > logger name as key?
> >
> > Thanks,
> >
> > Jochen
> >
> > --
> > The next time you hear: "Don't reinvent the wheel!"
> >
> >
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Matt Sicker <[email protected]>

Reply via email to