I have created an eclipse PDE project and have added log4j as a dependency using the slf4j-api and slf4j.log4j12 bundles. In a class I have created the logger:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MyTest {
private static final Logger logger = LoggerFactory.getLogger(MyTest.class
.getName());
public void tt() {
logger.info("log-test");
}
}
but when I run the PDE project using an OSGI launch configuration I get the warnings:
log4j:WARN No appenders could be found for logger (loggin_test.MyTest).
log4j:WARN Please initialize the log4j system properly.
based on this info:
I need to put the log4j.properties in the PDE classpath. I have tried to put it in the root of the PDE project and add:
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
log4j.properties
to the build.properties pane. But I still get the same warning. Where do I put the log4j.properties file in a PDE project?
EDIT: I have also tried adding it to the /src folder but it does not help.