druid会重复打印日志信息,怎么回事呢?
@wenshao 你好,想跟你请教个问题:
没有配置filters,只有proxyFilters
<property name="proxyFilters"> <list> <ref bean="stat-filter"/> <ref bean="wall-filter"/> <ref bean="log-filter"/> </list> </property> <bean id="stat-filter" class="com.alibaba.druid.filter.stat.StatFilter"> <property name="slowSqlMillis" value="3000" /> <property name="logSlowSql" value="true" /> </bean> <bean id="wall-filter" class="com.alibaba.druid.wall.WallFilter"> <property name="dbType" value="mysql" /> <property name="logViolation" value="true"/> <property name="throwException" value="false"/> </bean> <bean id="log-filter" class="com.alibaba.druid.filter.logging.Log4jFilter"> <property name="statementExecutableSqlLogEnable" value="false" /> <property name="resultSetLogEnabled" value="false" /> </bean>
log4j.logger.druid.sql=error,appendConsole log4j.logger.druid.sql.DataSource=error,appendConsole log4j.logger.druid.sql.Connection=error,appendConsole log4j.logger.druid.sql.Statement=debug,appendConsole log4j.logger.druid.sql.ResultSet=error,appendConsole
2014-12-16 15:10:28,611 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} created. select * from u_resource where enabled = 1>
2014-12-16 15:10:28,611 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} created. select * from u_resource where enabled = 1>
2014-12-16 15:10:28,611 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} created. select * from u_resource where enabled = 1>
2014-12-16 15:10:28,618 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} Parameters : []>
2014-12-16 15:10:28,618 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} Parameters : []>
2014-12-16 15:10:28,618 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} Parameters : []>
2014-12-16 15:10:28,618 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} Types : []>
2014-12-16 15:10:28,618 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} Types : []>
2014-12-16 15:10:28,618 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} Types : []>
2014-12-16 15:10:28,622 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000, rs-50000} query executed. 5.499854 millis. select * from u_resource where enabled = 1>
2014-12-16 15:10:28,622 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000, rs-50000} query executed. 5.499854 millis. select * from u_resource where enabled = 1>
2014-12-16 15:10:28,622 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000, rs-50000} query executed. 5.499854 millis. select * from u_resource where enabled = 1>
2014-12-16 15:10:28,630 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} closed>
2014-12-16 15:10:28,630 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} closed>
2014-12-16 15:10:28,630 DEBUG [druid.sql.Statement] - <{conn-10001, pstmt-20000} closed>
重复输出,不知道为什么
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
改为如下配置: