Thursday, May 27, 2010

Logging in Struts 2

Struts 2 provides a lot of logging information. To enable it in debug mode, just create log4j.properties file in classpath and add the following content:

log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n 

No comments:

Post a Comment