Re: LogManager.getLogger("name") not finding custom loggers
Stephen Johns <[email protected]> Wed, 20 Apr 2022 14:34:14 -0500
| Newsgroups | gmane.comp.jakarta.log4j.user |
|---|---|
| Message-ID | <CABXHmJiypvSLtgwOSDpndCRGGkD19sXzV3ECk0aAAcjNYF2HLQ@mail.gmail.com> |
Thank you! I believe you helped me with that in a different situation earlier this year. I promise I have learned it this time! On Wed, Apr 20, 2022 at 1:14 PM Piotr P. Karwasz <[email protected]> wrote: > Hello Stephen, > > On Wed, 20 Apr 2022 at 20:03, Stephen Johns <[email protected]> > wrote: > > > Configurator.initialize(configurationBuilder.build()); > > > > This only works if the `LoggerContext` has not been initialized yet. Since > every call to a `LogManager` method initializes a `LoggerContext`, it is > almost certainly too late to use `Configurator.initialize`. > > Use `Configuration.reconfigure` instead, which works in all cases. > > Piotr > -- ☮