ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From IBATIS <venkatesh.madha...@wipro.com>
Subject Re: Unable to log sql queries in my log files
Date Tue, 08 Jan 2008 20:40:10 GMT

Hi Chetan,

I would like to correct my previous message. 

I am not getting the selectLog4jLogging method from my LogFactory class. I
am currently using the following APIs. Please let me know if I need to
remove or replace someother Jar file.

Currently Used API are
Ibatis-2.3.0.677.jar
Ibatis-common-2.jar
Ibatis-sqlmap-2.jar
commons-logging.jar
log4j-1.2.13.jar

I believe that I need to instantiate the LogFactory class which is found
under com.ibatis.common.logging right?

Thanks
Venkat


Chetan Nayak wrote:
> 
> Try using this line before you make calls to IBATIS API,
>  LogFactory.selectLog4jLoggin() ,I'm just guessing here.
> 
> Thanks
> Chetan
> 
> 
> 
> On 1/9/08, IBATIS  wrote:
>>
>>
>> Hi 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/Please-help---Using-IBatis-in-RAD-7.0-tp13292529p14695875.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Please-help---Using-IBatis-in-RAD-7.0-tp13292529p14698230.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Mime
View raw message