Hi,
Having something similar to the following in log4j.properties will help.
Regards,
Zhongmin
# Global logging configuration
log4j.rootLogger=error,stdout
# log4j.rootLogger=debug,ibatisFile
# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
########### for ibatis
# SqlMap logging configuration...
log4j.logger.com.ibatis=DEBUG,ibatisFile
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG,ibatisFile
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG,ibatisFile
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG,ibatisFile
log4j.logger.java.sql.Connection=DEBUG,ibatisFile
log4j.logger.java.sql.Statement=DEBUG,ibatisFile
log4j.logger.java.sql.PreparedStatement=DEBUG,ibatisFile
log4j.logger.java.sql.ResultSet=DEBUG,ibatisFile
log4j.appender.ibatisFile=org.apache.log4j.RollingFileAppender
log4j.appender.ibatisFile.MaxFileSize=6MB
log4j.appender.ibatisFile.immediateFlush=true
log4j.appender.ibatisFile.MaxBackupIndex=3
log4j.appender.ibatisFile.File=<log file full path>
log4j.appender.ibatisFile.Threshold=DEBUG
log4j.appender.ibatisFile.append=true
log4j.appender.ibatisFile.layout=org.apache.log4j.PatternLayout
log4j.appender.ibatisFile.layout.ConversionPattern=%d{DATE} %c{3} %p - %m%n
On 8/3/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I am using iBatis 1.0
> any clue on to get iBatis1.0 to start logging generated queries?
>
> I have
> com.ibatis=DEBUG
> in log4j.properties that does not help
>
>
>
>
>
>
> TNO
> <[EMAIL PROTECTED]
> >
> To
> [email protected]
> 08/03/2005
> cc
> 07:30 AM
>
> Subject
> Re: SQL logging
> Please respond
> to
> [EMAIL PROTECTED]
> s.apache.org
>
>
>
>
>
>
> Try
> <category name="com.ibatis">
> <priority value="debug" />
> </category>
>
>
> Eugeny N Dzhurinsky a écrit :
>
> >Is there any way to view the queries the iBATIS generates? I tried to set up
> >the java.sql=DEBUG, in log4j, but no luck for now.
> >
> >
> >
>
>
> --
> Il n'y a pas de mauvais langage, il n'y a que des bons programmeurs...
>
>
>
>
>