ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guido García Bernardo <ggb...@tid.es>
Subject Re: logj4 and ibatis - How to log SQL statements [OT]
Date Mon, 11 Apr 2005 10:36:33 GMT
Thank you.

It doesn't work for me with Tomcat, but it works fine with SunOne web 
server, so I think it is a misconfiguration issue with 
commons-logging.jar (I must put it under WEB-INF/lib when working with 
SunOne, but I must remove it in order to get Tomcat working ¿?)

Thank you one more time,
Guido García Bernardo.

Brent Ryan wrote:

>Mine will log SQL statements fine if I do this:
># Set the root logging level for the application here.
># The below value contains the logging level followed by a list of appenders
>log4j.rootLogger=DEBUG, stdout
># The stdout appender sends all logging info to the console
>log4j.appender.stdout.layout.ConversionPattern=%p:%d - %m%n
>#log4j.appender.stdout.layout.ConversionPattern=%p:%d [%t] - %C:%M:%L - %m%n
>-----Original Message-----
>From:	Guido García Bernardo [mailto:ggarciab@itdeusto.com]
>Sent:	Fri 4/8/2005 1:30 AM
>To:	ibatis-user-java@incubator.apache.org
>Subject:	logj4 and ibatis - How to log SQL statements
>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.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.layout.ConversionPattern=%3p %d{ABSOLUTE} [%t 
>%c{1}] - %m%n
>Thank you very much in advance,
>Guido García Bernardo.

View raw message