Jul 29th, 2009, 06:08 PM
Problem importing org.apache.log4j
In my bundle I imported org.apache.log4j, which is exported by com.springsource.slf4j.org.apache.log4j-1.5.6.jar.
I wanted to implement log4j configuration for my own application, so in my code I used PropertyConfigurator. At runtime this class was not found, and i see why: the com.springsource.slf4j.org.apache.log4j-1.5.6.jar bundle contains just a few classes, not the whole log4j library.
Is this by design?
Anyway, how should I configure logging for my application? Is there a place where I can just drop the log4j.properties for the server to pick up?
Jul 29th, 2009, 11:34 PM
If you want to use log4j ,
1. just download the log4j bundle from the spring repository
2. copy it into ur repository/bundles/usr
3. In ut budnles which require log4j classes do the following
import package: org.apache.log4j;bundlesymbolicname="log4jbundlena me"
I am just not sure with the exact syntax of import package , just use the right tags(STS will help you out), it will work
Tags for this Thread