在做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信息打印.
我使用了log4j,在log4j.properties中加入 log4j.logger.o.mongodb.driver.cluster=WARN ,就可以屏蔽debug信息
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。