i trying log connection pooling org.apache.commons.dbcp.basicdatasource
using log4j
i using spring framework dao layer injection.
when saw code inside org.apache.commons.dbcp.basicdatasource
, logger not used .so seems impossible log pooling message me.
but again saw link http://forum.springsource.org/showthread.php?38306-connection-pooling-debug-info.
people saying put log4j.category.org.apache.dbcp=debug
. not find right answer.
question is, can connection pooling log using log4j org.apache.commons.dbcp.basicdatasource
?
it seems basicdatasource has printwriter, not logger member variable. you'd have call basicdatasource.setlogwriter(printwriter) printwriter wrapping log4j logger.
i came across this: http://www.opensource.apple.com/source/jboss/jboss-737/jboss-all/common/src/main/org/jboss/logging/util/loggerwriter.java
which seems that. don't know of tool in apache commons similar, class in link above seems accomplish looking for.
Comments
Post a Comment