Documentation‎ > ‎

JExcel Logging

To enable the logging, you should include slf4j-log4j12-1.5.8.jar and log4j-1.2.15.jar to the class path of your application and remove slf4j-simple-1.5.8.jar from it. This will force SLF4j to use Log4j framework for logging. Then, Log4j can be configured as shown below:

log4j.properties

# Root logger option
log4j.rootLogger=ALL, stdout  

# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender 
log4j.appender.stdout.Target=System.out 
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n

After that, the debug messages from JExcel will be printed out to the console. You can also configure Log4j to direct log messages to a file.