Hello, I am wondering how I can setup SLF4J's Log4J backend to use specific appenders in an OSGi/Spring environment. I have one bundle that adds an appender when it is started:
import org.apache.log4j.Appender; import org.apache.log4j.Logger; ... Logger logger = Logger.getRootLogger(); log.addAppender(myAppender); Now I obtain a logger from a different bundle, which is done as follows: import org.slf4j.Logger; import org.slf4j.LoggerFactory; ... Logger logger = LoggerFactory.getLogger(getClass().getName()); Issuing log messages to "logger" will not appear in the appender I specified in the first bundle. How can I fix this? I am using these dependencies in Maven for both bundles: <groupId>org.slf4j</groupId> <artifactId>com.springsource.slf4j.api</artifactId> <version>1.5.6</version> <groupId>org.slf4j</groupId> <artifactId>com.springsource.slf4j.log4j</artifactId> <version>1.5.6</version> Any help would be greatly appreciated! Samad
_______________________________________________ user mailing list user@slf4j.org http://www.slf4j.org/mailman/listinfo/user