logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Wiedmann <jochen.wiedm...@gmail.com>
Subject Multiple instances of log4j2.xml
Date Fri, 17 Jun 2016 08:41:42 GMT

I have an application (more precisely: a war file), which is deployed
identically on the same application server. (Think multi temancy),
Now, in Log4j 1, I handled that situation quite easily, like this:

    final String uri = tenantName + "/log4j.xml";
    final URL url = ClassLoader.getResource(uri);
    if (uri == null) {
        throw new IllegalStateException("Unable to locate logging
configuration: " + uri);

Or, in other words: For every tenant, I have a directory for
configuration files, including log4j.xml.
Simple, quick, and worked absolutely reliable.

But, how do I get this to work with log4j2?



The next time you hear: "Don't reinvent the wheel!"


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

View raw message