2013-08-28 73 views
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

我不認爲你可以很容易地壓制只是一個特定的錯誤,但你可以通過把

fatal 'org.atmosphere.websocket.DefaultWebSocketProcessor' 

你的log4j的瓶蓋內抑制該特定類別的所有ERROR級別的日誌信息。

+0

致命是指什麼? – confile

+1

@ confile它是最高的日誌級別,高於錯誤。因此,該陳述告訴log4j僅記錄「致命」級別或更高級別的消息(儘管在這種情況下沒有更高級別)並忽略較低級別。如果你使用'error',它會記錄錯誤和致命的消息,'警告'會記錄警告,錯誤和致命等。 –