spring log4j mongodb 关闭debug日志输出

配置上mongodb之后总是不停输出 Updating cluster description to 。。。。。。。。 信息

研究了一下关闭方法,配置如下:


log4j配置文件中添加  log4j.logger.org.mongodb.driver=OFF

发布了39 篇原创文章 · 获赞 14 · 访问量 12万+
展开阅读全文

mongodb3.0.1如何关闭debug

08-11

今天在做mongodb3.0.1与java项目整合时候,发现后台总是在打印debug信息 2015-08-11 17:32:24.621 [cluster-ClusterId{value='55c9c11e80df810c54492c6b', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Checking status of localhost:27017 2015-08-11 17:32:24.624 [cluster-ClusterId{value='55c9c11e80df810c54492c6b', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Updating cluster description to {type=STAN DALONE, servers=[{address=localhost:27017, type=STANDALONE, roundTripTime=0.9 ms, state=CONNECTED}] 2015-08-11 17:32:25.363 [cluster-ClusterId{value='55c9c11f80df810c54492c6c', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Checking status of localhost:27017 2015-08-11 17:32:25.365 [cluster-ClusterId{value='55c9c11f80df810c54492c6c', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Updating cluster description to {type=STAN DALONE, servers=[{address=localhost:27017, type=STANDALONE, roundTripTime=0.6 ms, state=CONNECTED}] 2015-08-11 17:32:34.626 [cluster-ClusterId{value='55c9c11e80df810c54492c6b', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Checking status of localhost:27017 2015-08-11 17:32:34.628 [cluster-ClusterId{value='55c9c11e80df810c54492c6b', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Updating cluster description to {type=STAN DALONE, servers=[{address=localhost:27017, type=STANDALONE, roundTripTime=1.0 ms, state=CONNECTED}] 2015-08-11 17:32:35.367 [cluster-ClusterId{value='55c9c11f80df810c54492c6c', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Checking status of localhost:27017 2015-08-11 17:32:35.369 [cluster-ClusterId{value='55c9c11f80df810c54492c6c', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Updating cluster description to {type=STAN DALONE, servers=[{address=localhost:27017, type=STANDALONE, roundTripTime=0.7 ms, state=CONNECTED}] 2015-08-11 17:32:44.629 [cluster-ClusterId{value='55c9c11e80df810c54492c6b', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Checking status of localhost:27017 2015-08-11 17:32:44.631 [cluster-ClusterId{value='55c9c11e80df810c54492c6b', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Updating cluster description to {type=STAN DALONE, servers=[{address=localhost:27017, type=STANDALONE, roundTripTime=1.1 ms, state=CONNECTED}] 2015-08-11 17:32:45.370 [cluster-ClusterId{value='55c9c11f80df810c54492c6c', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Checking status of localhost:27017 2015-08-11 17:32:45.372 [cluster-ClusterId{value='55c9c11f80df810c54492c6c', description='null'}-localhost:27017] DEBUG o.mongodb.driver.cluster.debug(56) - Updating cluster description to {type=STAN DALONE, servers=[{address=localhost:27017, type=STANDALONE, roundTripTime=0.8 ms, state=CONNECTED}] ``` ``` 请问如何关闭mongodb的这个debug信息打印 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览