So this is a follow up issue that arrised with this question: Using log4j in eclipse RCP doesn't work.
So far I'm able to use the log4j API inside my RCP but when running it with the following command
Category CAT = Category.getInstance(getClass().getSimpleName());
CAT.debug("Application has been started");
I get that exception:
No appenders could be found for category (MyPlugin).
Please initialize the log4j system properly.
I have created a fragment plugin containing a file called log4j.properties and the fragment host is the plugin containing the log4j API. The property file lives in the "root" of the fragment plugin
My log4j.properties file looks like that:
# Set root logger level to debug and its only appender to default.
log4j.rootLogger=debug, default
# default is set to be a ConsoleAppender.
log4j.appender.default=org.apache.log4j.ConsoleAppender
# default uses PatternLayout.
log4j.appender.default.layout=org.apache.log4j.PatternLayout
log4j.appender.default.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
Any ideas what I'm doing wrong?