I’m not trying to configure log4j for an Eclipse project but for the IDE itself!!
When using Xtext-based plugins, I’m seeing this warning in the console:
log4j:WARN No appenders could be found for logger (org.eclipse.xtext.ui.internal.Activator).
log4j:WARN Please initialize the log4j system properly.
How do I supply a log4j configuration to the IDE itself?
I tried adding -Dlog4j.configuration=.../log4j.properties to eclipse.ini. The entry is visible in About/Configuration and the file path is correct but it’s not picked up.
The
log4j.propertieshas to be on the classpath of theorg.apache.log4jplugin. Therefore you’ll have to provide a bundle fragment that contains your configuration.Xtext ships with
org.eclipse.xtext.loggingfor that reason.[EDIT] So one solution for the warning above is to make sure that the plugin
org.eclipse.xtext.loggingis installed. You can find it on the official Indigo download site.