Runtime components : Runtime Tools : Trace Facility : Tasks : How to trace to common Logging or Log4J
  
How to trace to common Logging or Log4J
You can use the function of Log4J by configuring the UDTT trace.
Note There is no need to set requestersComponents section here, as the trace level configuration will not take effect when tracing to common logging. You should use the configuration property file of common Logging or Log4J to set the trace level.
<kColl id="traces">
<field id="initializer" value="com.ibm.btt.base.TraceInitializer"/>
<field id="traceTargetFactoryImplClass"
value="com.ibm.btt.base.BTTLogFactoryToCommonLoggingImp"/>
</kColl>
The following is a configuration example of common logging and Log4J. The property files should be put under the root of the project class path.
commons-logging.properties:
org.apache.commons.logging.log=org.apache.commons.logging.impl.Log4JLogger
commons-logging.properties:
log4j.rootLogger = DEBUG,A2
log4j.appender.A2 = org.apache.log4j.RollingFileAppender
log4j.appender.A2.File = e:\\example.log
log4j.appender.A2.MaxFileSize = 1024KB
log4j.appender.A2.MaxBackupIndex = 3
log4j.appender.A2.layout = org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern = %d{yyyy-MM-dd hh:mm:ss}:%p %t %c - %m%n
For more information about how to use common logging and Log4J, see:
http://commons.apache.org/logging/guide.html and http://logging.apache.org/log4j/
See also
Tasks