Tomcat Log4j即使没有要写入的内容,也要继续写入日志文件?

Tomcat Log4j即使没有要写入的内容,也要继续写入日志文件?,tomcat,log4j,Tomcat,Log4j,我在tomcat服务器上部署了一个web应用程序。 我使用log4j进行日志记录。它工作得很好。 但问题是,当什么都没有发生时,log4j会不断地将以下内容写入日志文件: [DEBUG] 2016-03-09 09:13:46,617 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- R

我在tomcat服务器上部署了一个web应用程序。 我使用log4j进行日志记录。它工作得很好。 但问题是,当什么都没有发生时,log4j会不断地将以下内容写入日志文件:

[DEBUG] 2016-03-09 09:13:46,617 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:13:56,620 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:14:06,623 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:14:16,626 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:14:26,629 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:14:36,632 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:14:46,635 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:14:56,638 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:15:06,641 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:15:16,644 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
[DEBUG] 2016-03-09 09:15:26,647 com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1f3e145e -- Running DeadlockDetector[Exiting. No pending tasks.]
我不希望这些消息出现在日志文件中


有什么解决方案吗?

除了上面的消息外,log4j还写了一些其他消息,但什么都没有发生。所以日志文件在增长,看起来很尴尬。 我将阈值从
DEBUG
更改为
INFO
。 它解决了我的问题,我的日志现在看起来很干净