从记录中排除特定错误?

时间:2013-08-28 22:17:16

标签: grails grails-2.0

我想从记录中排除以下错误。我需要在Config.groovy上设置什么?

2013-08-28 15:10:13,501 [http-nio-8080-exec-85] ERROR websocket.DefaultWebSocketProcessor  - 
java.lang.IllegalStateException: Request object no longer valid. This object has been cancelled
    at org.atmosphere.cpr.AtmosphereResourceImpl.getRequest(AtmosphereResourceImpl.java:447)
    at org.atmosphere.cpr.AtmosphereResourceImpl.getRequest(AtmosphereResourceImpl.java:467)
    at org.atmosphere.websocket.protocol.SimpleHttpProtocol.onMessage(SimpleHttpProtocol.java:95)
    at org.atmosphere.websocket.DefaultWebSocketProcessor.invokeWebSocketProtocol(DefaultWebSocketProcessor.java:293)
    at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatchReader(DefaultWebSocketProcessor.java:627)
    at org.atmosphere.websocket.DefaultWebSocketProcessor.invokeWebSocketProtocol(DefaultWebSocketProcessor.java:402)
    at org.atmosphere.container.TomcatWebSocketHandler.onTextData(TomcatWebSocketHandler.java:100)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)

1 个答案:

答案 0 :(得分:1)

我认为您不能轻易地仅仅抑制那个特定错误,但您可以通过添加

来抑制该特定类的所有ERROR级别日志消息
fatal 'org.atmosphere.websocket.DefaultWebSocketProcessor'

在log4j闭包内。