我有一个 Play 2.0 应用程序,play console
从命令行运行。在我使用的一个库中的某个地方,它使用log4j
并开始流式传输调试输出[crawler4j][1]
,我试图弄清楚如何在播放控制台中选择性地禁用该输出。我尝试更改以下内容application.conf
但logger.xml
没有任何运气
application.conf
logger.root=ERROR
logger.play=ERROR
logger.application=ERROR
logger.xml
<logger name="org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager" level="ERROR"/>
这是流式调试日志的示例
13:10:18.818 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Closing connections idle longer than 60 SECONDS
13:10:18.818 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Closing connections idle longer than 60 SECONDS
13:10:18.818 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Closing connections idle longer than 60 SECONDS
13:10:18.818 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Closing connections idle longer than 60 SECONDS
13:10:18.818 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Closing connections idle longer than 60 SECONDS
13:10:18.818 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Closing connections idle longer than 60 SECONDS
13:10:18.819 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Closing connections idle longer than 60 SECONDS
13:11:18.818 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Closing connections idle longer than 60 SECONDS
13:11:18.818 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Closing connections idle longer than 60 SECONDS
13:11:18.819 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Closing connections idle longer than 60 SECONDS
13:11:18.819 [java-sdk-http-connection-reaper] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Closing connections idle longer than 60 SECONDS
需要明确的是,当我从命令行运行 Play 应用程序时会强制执行日志设置,而当我从命令行运行它时,play console
不会强制执行设置。