链接mongodb之后,在调试时发现如下信息:
7:54:56.179 DEBUG com.mongodb.diagnostics.logging.SLF4JLogger 56 debug - Checking status of xxx.xxx.xxx.xxx:27017
17:54:56.180 DEBUG com.mongodb.diagnostics.logging.SLF4JLogger 56 debug - Updating cluster description to {type=STANDALONE, servers=[{address=xxx.xxx.xxx.xxx:27017, type=STANDALONE, roundTripTime=1.2 ms, state=CONNECTED}]
循环出现,会把正常的logger.info消息或者其他调试信息慢慢顶掉,调试时很不友好,怎么去掉呢?
log4j配置文件中添加 log4j.logger.org.mongodb.driver=OFF 即可