ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guido García Bernardo <ggarc...@itdeusto.com>
Subject logj4 and ibatis - How to log SQL statements
Date Fri, 08 Apr 2005 08:30:22 GMT
Hi,

I need to log SQL statements.  I'm using tomcat 4.1.31 + ibatis 2.0.9 + 
log4j 1.2.8 as described in "ibatis SQL Maps Developer Guide version 
2.0" (June 17, 2004):

I have put the log4j.properties file in WEB-INF/classes folder (¿is this 
ok?), and it seems to work because if I do 
Logger.getRootLogger().debug("foo"); it works fine.
Any idea of why we are not able to see SQL statements?

log4j.rootLogger=DEBUG, consola

log4j.logger.com.ibatis=DEBUG, consola
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG, consola
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG, consola
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG, 
consola
log4j.logger.java.sql.Connection=DEBUG, consola
log4j.logger.java.sql.Statement=DEBUG, consola
log4j.logger.java.sql.PreparedStatement=DEBUG, consola
log4j.logger.java.sql.ResultSet=DEBUG, consola

### Appenders
log4j.appender.consola=org.apache.log4j.ConsoleAppender
log4j.appender.consola.layout=org.apache.log4j.PatternLayout
log4j.appender.consola.layout.ConversionPattern=%3p %d{ABSOLUTE} [%t 
%c{1}] - %m%n

Thank you very much in advance,
Guido García Bernardo.



Mime
View raw message