ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yee, Richard K CTR DMDC" <Richard.Yee....@osd.pentagon.mil>
Subject RE: Double entries in my log4j output?
Date Tue, 19 Jun 2007 13:36:43 GMT
Mark,
This is what is causing your duplicate output statements:

log4j.rootlogger=INFO, db_appender
log4j.logger.com.ibatis=INFO, db_appender
log4j.logger.java.sql=INFO, db_appender 
log4j.logger.java.sql.Connection=DEBUG, db_appender

Remove these lines:
log4j.logger.com.ibatis=INFO, db_appender
log4j.logger.java.sql=INFO, db_appender  
log4j.logger.java.sql.Connection=DEBUG, db_appender

-Richard

-----Original Message-----
From: Mark Collins [mailto:mcollins@doc.state.nc.us] 
Sent: Monday, June 18, 2007 7:47 AM
To: user-java@ibatis.apache.org
Subject: Double entries in my log4j output?

I got SQL Logging to work from browsing tips here, but I'm now seeing
what look like double-entries in my log, like so:

2007-06-15 15:35:53,243 {conn-101049} Connection
2007-06-15 15:35:53,243 {conn-101049} Connection
2007-06-15 15:35:53,243 {conn-101049} Preparing Statement:
select       ASSETID, SEQNBR, ASSETSTAT, NOTETXT, DTOFUPDT, TMOFUPDT,
STFOFUPDT, OWNERFACL, CDPPSLOC, USERID       from HZAZDB3.DCAV1AH1
where ASSETID = ? order by SEQNBR desc    
2007-06-15 15:35:53,243 {conn-101049} Preparing Statement:
select       ASSETID, SEQNBR, ASSETSTAT, NOTETXT, DTOFUPDT, TMOFUPDT,
STFOFUPDT, OWNERFACL, CDPPSLOC, USERID       from HZAZDB3.DCAV1AH1
where ASSETID = ? order by SEQNBR desc     

Just wondering if I'm really having things happen twice or is there
something else causing the double lines.

Here is the appropriate section from my log4j properties:

log4j.rootlogger=INFO, db_appender
log4j.logger.com.ibatis=INFO, db_appender log4j.logger.java.sql=INFO,
db_appender log4j.logger.java.sql.Connection=DEBUG, db_appender
#log4j.logger.java.sql.Statement=DEBUG, db_appender
#log4j.logger.java.sql.PreparedStatement=DEBUG, db_appender
log4j.additivity.java.sql=false log4j.additivity.com.ibatis=false

log4j.appender.db_appender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.db_appender.DatePattern='.'yyyy-MM-dd
log4j.appender.db_appender.append=true
log4j.appender.db_appender.layout=org.apache.log4j.PatternLayout
log4j.appender.db_appender.layout.ConversionPattern=%d{ISO8601} %m%n
log4j.appender.db_appender.file=c:/logs/ibatis.log




Mark Collins
(919)716-3554
--------------------
"E-mail correspondence to and from this address may be subject to the
North Carolina Public Records Law and may be disclosed to third parties
by an authorized state official."
--------------------



Mime
View raw message