Re: [External Sender] Re: Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-09 Thread Jason Wen
Here is our code snippet: public void configure(URL configURL) { System.setProperty(ConfigurationFactory.LOG4J1_CONFIGURATION_FILE_PROPERTY, configURL.toString()); System.clearProperty(LOG4J1_MONITOR_INTERVAL); LoggerContext context = LoggerContext.getContext(false); context.setConf

RE: [External Sender] Re: Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-09 Thread Pooja Pandey
Hi Jason, -> Our solution is to use log4j2 api to implement what PropertyConfigurator.configure does. Can you please share the solution snippet for reference? Thanks, Pooja -Original Message- From: Jason Wen Sent: Wednesday, March 9, 2022 9:16 PM To: Log4J Users List Subject: Re: [

Re: [External Sender] Re: Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-09 Thread Gary Gregory
Except that it does in 2.17.2, the site is not up to date, sorry about that. In this case, there might be a bug when reconfiguring log4j as opposed to the initial configuration loaded. Gary On Wed, Mar 9, 2022, 10:46 Jason Wen wrote: > Hi Pooja, > > We faced the same problem that log4j1.x bridg

Re: [External Sender] Re: Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-09 Thread Jason Wen
Hi Pooja, We faced the same problem that log4j1.x bridge does not support PropertyConfigurator API. See https://logging.apache.org/log4j/2.x/manual/migration.html Limitations of the Log4j 1.x bridge Applications can migrate by just using the bridge without further code changes, if they m

Re: Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-09 Thread Gary Gregory
Hello Pooja, Please describe exactly what is happening. The information provided in too vague. I take it from previous messages that you are using Log4j 2.17.2 jars and that there are no Log4j 1 jars on your class path? A reproduced would be best, preferably as a failing test in a GitHub PR. Other

Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-09 Thread Pooja Pandey
We are using PropertyConfigurator.configure(), but this doesn't work in log4j1.x bridge. Please let me know if you have any idea on how to fix it. Thanks, Pooja