# Logging

Xtext uses Apache’s log4j for logging. It is configured using the so called log4j.properties, which is looked up in the root of the Java classpath. If you want to change or provide configuration at runtime (i.e. non-OSGI), all you have to do is putting such a log4j.properties in place and make sure that it is not overridden by other log4j.properties in previous classpath entries.

In OSGi you provide configuration by creating a fragment for org.apache.log4j. In this case you need to make sure that there’s no second fragment contributing a log4j.properties file.