I am trying to log connection pooling for org.apache.commons.dbcp.BasicDataSource using log4j
org.apache.commons.dbcp.BasicDataSource
I am using spring framework for dao layer injection.
W
Its too late since the question was asked but this is how I fixed the issue:
Specify the logger to the driver in JDBC URL
new BasicDataSource().setUrl("jdbc:mysql://localhost/DBName?logger=com.mysql.jdbc.log.Slf4JLogger&profileSQL=true");