Re: manual log4j2 initialization inside webapp ends up in extra LoggerContext

2022-03-24 Thread Ralph Goers
By default, Log4j 2 uses ClassLoaderContextSelector. The way this works is that whenever LogManager.getLogger() is called LogManager will call ClassLoaderContextSelector which will locate the LoggerContext associated with the ClassLoader of the class that called LogManager.getLogger(). In web c

Re: Reg: Needs help on logging issues on log4j2 latest version 2.17.2

2022-03-24 Thread Piotr P. Karwasz
Hi Arulkumar, On Thu, 24 Mar 2022 at 07:30, Arulkumar Ponnusamy wrote: > However, What i noticed is, the Configurator.setLevel() method's > Logger.getContext has a different reference id whereas the actual class's > LoggerFactory.getLogger(class) has a different context id. I guess, because > of

Re: Reg: Needs help on logging issues on log4j2 latest version 2.17.2

2022-03-24 Thread Arulkumar Ponnusamy
Thanks So much for the clarification Piotr. Will look into the ContextSelector section. Thanks and regards Arulkumar Ponnusamy On Thu, Mar 24, 2022 at 2:21 PM Piotr P. Karwasz wrote: > Hi Arulkumar, > > On Thu, 24 Mar 2022 at 07:30, Arulkumar Ponnusamy > wrote: > > > However, What i noticed i

Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2)

2022-03-24 Thread Pooja Pandey
Hi, In our application we have migrated from log4j1.x to log4j1.x bridge. With Log4j1.x there was no issue with multithreading but with log4j 1.x bridge we have noticed that in multithreading environment there is a huge data loss while logging, however single thread works fine. I see that in Ca

RE: Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2)

2022-03-24 Thread Pooja Pandey
Attaching sample test program for simulated multithreading logging. From: Pooja Pandey Sent: Friday, March 25, 2022 4:37 AM To: Log4J Users List Subject: Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2) *** External email: Verify sende

Re: Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2)

2022-03-24 Thread Matt Sicker
None of those attachments made it through to the mailing list. On Thu, Mar 24, 2022 at 6:22 PM Pooja Pandey wrote: > Attaching sample test program for simulated multithreading logging. > > > > *From:* Pooja Pandey > *Sent:* Friday, March 25, 2022 4:37 AM > *To:* Log4J Users List > *Subject:* S

RE: Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2)

2022-03-24 Thread Pooja Pandey
Just for reference, few methods which were synchronized earlier in log4j1.x but not anymore in log4j1.x bridge. 1. public void addAppender(final Appender appender) 2. public Appender getAppender(final String name) 3. public void removeAppender(final Appender appender) 4. public void remove