Details
-
Enhancement
-
Resolution: Won't Do
-
Major
-
jboss-fuse-6.0
-
None
-
None
-
%
Description
Very often an user would like to add a custom Log4j appender to child containers in a Fabric environment. And this process is really difficult and I have not found a better and easy solution to do so. Although I have got some information about how it should be done in a Fabric environment, I have not managed to get it to work properly and the only option for me is to connect to each individual child containers and configure a custom appender there. Here is some information about how it should be done in a Fabric environment:
That's exactly the same as a non-fabric environment, though the deployment mechanism changes.
If the appender is using the log4j api, it needs to be deployed as a fragment and attached to the pax-logging-service bundle.For this use case, it can be done by changing the karaf profile and add the fragment bundle explicitly as a bundle to deploy. To configure it, you'll have to add the a org.ops4j.pax.logging.properties file in the profile to have the pax-logging configuration distributed to all fabric containers.
In a Fabric environment, most likely we will have large amount of child containers spread all over the network and we should provide a better and easy way for adding or modifying custom Log4j appender on child container.