Aaron Digulla
Aaron Digulla

Reputation: 328614

How do I pass a log4j configuration to the Eclipse IDE itself?

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.

Upvotes: 1

Views: 3643

Answers (2)

postNuKe
postNuKe

Reputation: 341

The solution for me was install xText SDK, from Eclipse repositorie

Upvotes: 0

Sebastian Zarnekow
Sebastian Zarnekow

Reputation: 6729

The log4j.properties has to be on the classpath of the org.apache.log4j plugin. Therefore you'll have to provide a bundle fragment that contains your configuration.

Xtext ships with org.eclipse.xtext.logging for that reason.

[EDIT] So one solution for the warning above is to make sure that the plugin org.eclipse.xtext.logging is installed. You can find it on the official Indigo download site.

Upvotes: 3

Related Questions