Having a log4j configuration is useful for seeing what is happening when unit tests are executed. The test kit contains functionality for configuring message tracing, which also helps, but not if there is no logging to begin with.
Below is a sample of what the log4j.xml file should look like:
<?xml version="1.0" encoding="UTF-8"?>
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c] %m%n"/>
</layout>
</appender>
<logger name="org.jboss.weld.Bootstrap">
<level value="ERROR"/>
</logger>
<root>
<level value="INFO"/>
<appender-ref ref="STDOUT"/>
</root>
</log4j:configuration>
|