You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by IBATIS <ve...@wipro.com> on 2008/01/08 19:36:01 UTC

Unable to log sql queries into my log files

Hello There,

I am unable to log my sql queries used in ibatis sql mapper. Let me narrate
the steps I used.

I have put the following entries into my log4j.properties file.
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.SqlMapClientImpl=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=/logs/MyIBatis.log
log4j.appender.ibatisFile.Threshold=DEBUG
log4j.appender.ibatisFile.append=true
log4j.appender.ibatisFile.layout=org.apache.log4j.PatternLayout
log4j.appender.ibatisFile.layout.ConversionPattern=%d{yyyy/MM/dd
HH:mm:ss,SSS}: <%p> %m%n

I have put my log4j.property file under ejbModule (I am using RAD 7.0 and
this folder would be created when we are creating an ejb project). I have my
log entries in the same log files which is working fine. 
I am unable to see the sql queries in 'MyIBatis.log'. The file
'MyIBatis.log' is getting generated but there are no sql entries into it.

Please help me out. Tell me where I am doing wrong. 

Thanks
Venkat

-- 
View this message in context: http://www.nabble.com/Unable-to-log-sql-queries-into-my-log-files-tp14695877p14695877.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.