Mine will log SQL statements fine if I do this: # Set the root logging level for the application here. # DEBUG < INFO < WARN < ERROR < FATAL # 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=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%p:%d - %m%n #log4j.appender.stdout.layout.ConversionPattern=%p:%d [%t] - %C:%M:%L - %m%n Brent -----Original Message----- From: Guido García Bernardo [mailto:[EMAIL PROTECTED] Sent: Fri 4/8/2005 1:30 AM To: ibatis-user-java@incubator.apache.org Cc: Subject: logj4 and ibatis - How to log SQL statements 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. Don't miss the 2005 Blackboard Users Conference April 12-14 in Baltimore, MD! Visit http://www.blackboard.com/about/events/BbUC05/index.htm for more information. This e-mail is intended only for the personal and confidential use of the recipient(s) named above. It may include Blackboard confidential and proprietary information, and is not for redistribution.
<<winmail.dat>>