Previous Topic: Automatic Thread DumpsNext Topic: Monitoring


Test Step Logger

As described in Elements of a Test Step in Using CA Application Test, each test step includes a log message element.

To send the log message to a specific file at runtime, add the following properties to the logging.properties file in the LISA_HOME directory.

log4j.logger.com.itko.lisa.test.StepLogger=DEBUG, A2
log4j.additivity.com.itko.lisa.test.StepLogger=false
log4j.appender.A2=org.apache.log4j.RollingFileAppender
log4j.appender.A2.File=${lisa.tmpdir}/log.log
log4j.appender.A2.MaxFileSize=10MB
log4j.appender.A2.MaxBackupIndex=5
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %-30c - %m%n

The values of the File, MaxFileSize, and MaxBackupIndex properties can be different from the values that are shown in the preceding example.

Note: After you add the properties, restart DevTest Workstation (if currently running).

The resulting message in the log file is similar to the following example:

2012-07-11 17:32:59,390 [basic-test/basic-test [QuickStageRun]/0] DEBUG com.itko.lisa.test.StepLogger  - 
LOG basic-test,basic-test [QuickStageRun],local,0,3,my log message

The portion of the message after LOG consists of six components: