Help documentation

Debugging in Twist

Configure Logging support

Twist can be run with logging turned on. This would be quite useful in troubleshooting issues related to execution of scenarios.

Twist uses log4j for logging. You could specify a log4j configuration properties file to Twist.

To specify log4j configuration, do any of the following:
  1. Specify the system property log4j.configuration=<path_to_log4j_properties_file>. This property could be set by modifying Twist executable and adding the vmargs property, like so:
    .../eclipse.exe -vmargs -Dlog4j.configuration=<path_to_lo4j_properties>
                
  2. Adding a log4j.properties to source path: copy the log4j.properties file into any of the top level folders in the source path.

Sample log4j.properties file

Here is a sample log4j.properties file that you can use.
log4j.rootLogger=WARN, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r %-5p %c %x - %m%n

log4j.logger.com.thoughtworks.twist.execution=DEBUG
log4j.logger.com.thoughtworks.twist.recording=DEBUG
log4j.logger.com.thoughtworks.twist.remote=DEBUG
log4j.logger.com.thoughtworks.twist.migration=DEBUG
log4j.logger.com.thoughtworks.twist.classpath=DEBUG

# Uncomment this to debug how Twist loads classes
#log4j.logger.com.thoughtworks.twist.core.utils.ClasspathResources