logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Kostousov <de...@kst-d.net>
Subject Different log4j v2 config file for different ear
Date Mon, 14 Mar 2016 05:45:27 GMT
Hello, All.

I want to use log4j from my own JavaEE applications. These applications consist of some ejb-jars
and wars. I need to use separate config file for each application.
I tried to write @Singleton EJB that reconfigures log4j with specific file:
        LoggerContext context = (org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false);

But this didn't work in my case.
How I can specify the log4j config file name in ear?

Denis Kostousov
email: denisATkst-dDOTnet
jabber: sandelloATjabber.ru
fingerprint: 8333 395D 395A B7D7 2CDF BBBF 14E2 EE1E E797 04EB
linkedin: http://www.linkedin.com/profile/view?id=101014719

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message