Re: Need help creating second, separate logger

2022-05-23 Thread Stephen Johns
Yes. Approaching from use case may be better. I am trying to port some software from lo4j1. This is the first time I have used log4j, and don't have access to the original authors. In that code, they extended Logger classes in ways that are no longer supported in log4j2. They created custom logge

Re: Need help creating second, separate logger

2022-05-20 Thread Ralph Goers
Yes, I’d like to know that too. We have consistently found in the past that questions regarding “how can I make this code work?” almost always do not produce as good results as when answering “how can I make this use case work?”. Ralph > On May 20, 2022, at 6:16 AM, Volkan Yazıcı wrote: > >

Re: Need help creating second, separate logger

2022-05-20 Thread Volkan Yazıcı
Stephen, given your past questions, I see that you are trying to programmatically configure Log4j with interesting features, e.g., multiple logger contexts and such. May I ask what is your use case? What are you exactly trying to solve? On Thu, May 19, 2022 at 5:57 PM Stephen Johns wrote: > I am

Re: Need help creating second, separate logger

2022-05-19 Thread Matt Sicker
You’ll need to configure a ContextSelector if you want to create more than one LoggerContext per ClassLoader as the default strategy works that way. — Matt Sicker > On May 19, 2022, at 10:57, Stephen Johns wrote: > > I am trying to create a completely separate second > Context/Configuration/L

Need help creating second, separate logger

2022-05-19 Thread Stephen Johns
I am trying to create a completely separate second Context/Configuration/Logger - not a logger within an existing config/context. Log messages are going to STDOUT. Current code ConfigurationBuilder _configurationBuilder = ConfigurationBuilderFactory.newConfigurationBuilder(); _co