views:

157

answers:

1

How to turn on logging queries in GWT hosted mode?

A: 

The iBATIS framework records its interaction with the database through an internal logging mechanism patterned after Apache Log4J. The internal logging mechanism can use one of the three built-in loggers or external logging packages such as Apache Log4J. In order for iBATIS to generate log messages, the application's config file (log4j.properties or log4j.xml) must be put in default package and contains for example:


log4j.appender.C=org.apache.log4j.ConsoleAppender
log4j.appender.C.layout=org.apache.log4j.PatternLayout
log4j.appender.C.layout.ConversionPattern=[%p] %c - %m - Date: %d %n
log4j.rootLogger=TRACE, C

That was the configuration. Apart of that you must download log4j library and put it into your classpath. At the moment the newest version is log4j-1.2.16.jar.

kospiotr