You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by afbagwe <af...@sandia.gov> on 2017/06/27 16:48:22 UTC

Log4j2 composition?

Is there any way to take advantage of Log4J2 composition rules inside of
Karaf?

https://logging.apache.org/log4j/2.x/manual/configuration.html#CompositeConfiguration

I'm using Karaf and configuring with the pax-logging CFG file and pointing
to a log4j2.xml file in my etc/ folder. Works great, except this is a
standard config and the deployment of our Karaf instances don't have the
logging for a given application specified ahead of time.

I'd like to be able to deploy my app into Karaf with it's own log4j2 xml and
have it added to the base configuration (in some cases referencing appenders
already defined there) rather than edit the base log4j2 file itself.

So far I haven't figured out a way to do this.

Tried to reference a log4j.component.properties file in the etc directory so
I could set the log4j.configurationFile system property and didn't succeed.



--
View this message in context: http://karaf.922171.n3.nabble.com/Log4j2-composition-tp4050876.html
Sent from the Karaf - User mailing list archive at Nabble.com.