Hi,
I am trying to reinitialization log4j2 configuration, but it doesn't work
if log4j1 and log4j2 jars are in the classpath.

Our setup has both log4j1 and log4j2 jars in classpath.

It works fine if we remove log4j1 jar from the classpath. We can't remove
log4j1 jar as it comes from a different setup.

We tried the following code.

org.apache.logging.log4j.core.config.Configurator.initialize(null, hive_l4j);

We also tried other options like

    final org.apache.logging.log4j.core.LoggerContext ctx =
(org.apache.logging.log4j.core.LoggerContext)
LogManager.getContext(false);
ctx.setConfigLocation(configLocation)

and

org.apache.logging.log4j.core.config.Configurator.reconfigure();

Nothing seems to be working.

log4j2.debug doesn't give any clue on why log4j2 configuration
reinitialization is ignored.

Any clue on how to make it work? The log4j properties are in log4j2 format.


Thanks,

Reply via email to