Debugging the Batch Processor

Debugging the Batch Processor

In order to find out specific details about what the batch processor is doing, such as identifying the SQL queries being performed or verifying that the configuration is being applied as expected, the log configuration provides the ability to change the amount of information provided by the batch processor, and where the information is written.

In the topic Use log messages in the Batch Processor, the sections Java – log4j – Configuration and .NET – log4net – Configuration both describe the default logging configuration, and where to place an alternate configuration file.

The Example section provides an alternative log configuration that includes examples on how to configure a file appender and set the logging level for a specific appender, or for the application as a whole.

 

For a more specific example, a new file appender could be declared to write debug level information to a file called debug.log as follows:

 

<appender name="debug-log" class="org.apache.log4j.FileAppender">
                <param name="File" value="debug.log" />
                <param name="Threshold" value="debug" />
                <layout class="org.apache.log4j.PatternLayout">
                                <param name="ConversionPattern" value="%t - %m%n" />
                </layout>
</appender>

 

To configure the application to generate DEBUG level information and to write it to the file appender defined above, the root logger would be configured as follows:

 

<root>
         <priority value="DEBUG" />
         <appender-ref ref="debug-log" />
</root>

 

For more detailed information, it is recommended that you visit the following web sites:

http://logging.apache.org/log4j/1.2/index.html

http://logging.apache.org/log4net/