-
Notifications
You must be signed in to change notification settings - Fork 122
Debugging ThreadFix Issues
When reporting errors or trying to debug unexpected behaviors in ThreadFix, it helps to know where to find logs and error messages that are generated. In addition, it can be helpful to increase the amount of logging in order to get access to more thorough debug information. This document describes where ThreadFix logs messages and error conditions as well as how to increase the amount of logging for deeper debugging.
ThreadFix also uses Log4j to log events to text files. The default logging level is set to INFO. In addition, Tomcat logs its operations as well as STDOUT and STDERR.
These log files can be found in $CATALINA_HOME/logs/ in the standard Tomcat installation. Note that these log files are typically configured to roll over on a daily basis, with older log files being named with the date when they were created. The log files are:
- threadfix.log - ThreadFix-specific logging messages. Look here first.
- catalina
- localhost
- manager
- host-manager
The default ThreadFix level of INFO is sufficient to debug most normal operations and error conditions. However, in certain cases there may be value in having access to more in-depth logging information. To increase the level of logging, simply update the log4j configuration file and restart Tomcat.
The log4j configuration file is located at $CATALINA_HOME/webapps/threadfix/classes/log4j.xml
The following appender should be updated:
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="threadfix.log" />
<param name="datePattern" value="'.'yyyy-MM" />
<param name="append" value="true" />
<param name="Threshold" value="DEBUG"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %C{6} (%F:%L) - %m%n"/>
</layout>
</appender>
ThreadFix attempts to trap error conditions and return sensible error messages to the user. In cases where unexpected Exceptions are thrown, these are trapped and the Exception messages are saved to the ThreadFix database. These messages can be found via the XYZ menu. See the screenshot below:
ThreadFix also uses Log4j to log events to text files. These files can be found in XYZ in the standard Tomcat installation.
By default, messages at INFO level and above are logged to the file. To increase the amount of logging,