different log4j configurations per su

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

different log4j configurations per su

Marcin K.
Hi,

I'd like to have different log4j configuration per su (few service units logging to one file and few to other file).
I know that I can use conf/log4j.xml file, but the problem is that I have common classes used in different su.
So I can't have such configuration in conf directory as the logging logic for the same package depends on su.

Does anyone has any idea how to solve that?

Thanks,
Marcin K.
Reply | Threaded
Open this post in threaded view
|

Re: different log4j configurations per su

Jean-Baptiste Onofré
 Hi Marcin,

 regarding the SMX classloading model :
 http://servicemix.apache.org/classloaders.html

 you have a classloader by SU (that you can define using
<classpath/>).

 So you can put a specific log4j.xml for your SU in the classloader.

 In this log4j, you can define an appender dedicated for you SU and
define the log level and category that you want.

 Regards
 JB
 --
 Jean-Baptiste Onofré
 [hidden email]
 BuildProcess/AutoDeploy Project Leader
 http://buildprocess.sourceforge.net

 On Tue 25/11/08 16:29, "Marcin K." [hidden email] wrote:

 Hi,

 I'd like to have different log4j configuration per su (few service
units
 logging to one file and few to other file).
 I know that I can use conf/log4j.xml file, but the problem is that I
have
 common classes used in different su.
 So I can't have such configuration in conf directory as the logging
logic
 for the same package depends on su.

 Does anyone has any idea how to solve that?

 Thanks,
 Marcin K.

 --
 View this message in context:
http://www.nabble.com/different-log4j-configurations-per-su-tp20682882p20682882.html
[1]
 Sent from the ServiceMix - User mailing list archive at Nabble.com.



Links:
------
[1]
http://www.nabble.com/different-log4j-configurations-per-su-tp20682882p20682882.html