ibatis logging log4j - only log the specific mapper queries and resultsets

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ibatis logging log4j - only log the specific mapper queries and resultsets

sharma
This post has NOT been accepted by the mailing list yet.
Hi All,

I am facing one issue in logging ibatis statements and resultsets. Currently it is enabled in DEBUG mode in log4j.properties. So that its logging all the queries and resultsets. So what happen, logging size is too large customer dont want that. in the mean time they want to enable some statements and resultsets not for all.
I am investigating this and found that if you mentioned the below line it will debug particular mapper not all.I have tried the below line. But it didnt work. Can you please help me where i am doing the mistake.

# SqlMap logging configuration...
log4j.logger.com.ibatis=DEBUG
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
log4j.logger.java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
#log4j.logger.java.sql.PreparedStatement=DEBUG
#log4j.logger.java.sql.ResultSet=DEBUG
log4j.logger.com.XXX.YYYY.ds.dao = DEBUG
log4j.logger.com.XXX.YYYY.ds.dao.ZZZMapper=DEBUG

Regards
Sharma