How log4j.properties is used in Studio

In Studio, a log4j.properties configuration file is used to start up the Tomcat bundle. Otherwise, all log4j configuration comes from the XML configuration files.

Using log4j.properties when starting up the Tomcat bundle

The version of log4j.properties in common/endorsed/log4j.properties.jar is used to configure logging for the Tomcat bundle. Because log4j is initialized before Studio in the Tomcat bundle, this file is needed to ensure that there is some preliminary log4j configuration.

This version of log4j.properties provides minimal configuration, so that the initial messages are logged to the console in the same format as the default configuration in portal-log4j-ext.xml. Its settings only affect a small number of messages printed as the server is starting.

When Studio starts, it loads its XML configuration file, which overrides the settings in log4j.properties. Therefore administrators should not need to modify log4j.properties.

Other log4j.properties files

In addition to the log4j.properties file used for the Tomcat startup, all deployed components, as well as the Studio application itself, have their own log4j.properties files, located in WEB-INF/classes.

Because Studio uses XML configuration files, the settings in these files have no effect.