Answer Log4j can be configured via a properties file or an xml file. The below is an example of configuring Log4j using a properties file. Generally for simplicity the file name is called as but can be anything.

Typical Configuration

log4j.rootLogger=trace,R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=../logs/server.log log4j.appender.R.MaxFileSize=1024KB log4j.appender.R.MaxBackupIndex=5 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d[%t]%-5p%c{1}%x-%m%n

Disable Apache Low Level Logging

Adding the following in above to disable DEBUG or TRACE level logging originating from these Apache common packages. To disable Apache Axis logging further add: Like wise to disable Apache Struts logging you can add: Please make sure this file is in the class path and specify the file name as a value to environment variable in your startup script , rest it will configure automatically.