ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murtaza Goga" <Murtaza.G...@trisyngroup.com>
Subject RE: Logging SQL statements
Date Fri, 23 Mar 2007 12:04:17 GMT
It would.  
You could extend the FileAppender in Log4J and filter out the selects.
Not as elegant but it would work.

-----Original Message-----
From: K1RUHA [mailto:kiryl_kazakevich@yahoo.com] 
Sent: Friday, March 23, 2007 7:37 AM
To: user-java@ibatis.apache.org
Subject: RE: Logging SQL statements


But this approach will also generate log messages for SELECT statements.
I
was thinking about getting sql statements in DAO and then log them
depending
on configuration parameter.



Goga, Murtaza wrote:
> 
> If you are using Log4J, you can add an appender and route the logged
sql
> activity from iBatis into a separate file.  The category I believe is
> "java.sql." 
> 
>  
> 
> ________________________________
> 
> From: K1RUHA [mailto:kiryl_kazakevich@yahoo.com] 
> Sent: Friday, March 23, 2007 6:59 AM
> To: user-java@ibatis.apache.org
> Subject: Logging SQL statements
> 
>  
> 
> Hello. I'd like to use iBATIS in our project, but I have one
requierent,
> that I don't know if it supports. I need to log SQL statements that
> modify database (UPDATE and DELETE) into separate file. So I need some
> approach to get these statements in my Java code. Would you mind tell
me
> if iBATIS can do this? Thanx, Kiryl 
> 
> ________________________________
> 
> View this message in context: Logging SQL statements
> <http://www.nabble.com/Logging-SQL-statements-tf3453072.html#a9632495>

> Sent from the iBATIS - User - Java mailing list archive
> <http://www.nabble.com/iBATIS---User---Java-f370.html>  at Nabble.com.
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Logging-SQL-statements-tf3453072.html#a9632994
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Mime
View raw message