2010-07-14 79 views
2

我已經在我的log4j的文件如何在httpclient中爲log4j關閉警告消息?

#set httpclient debug levels 
log4j.logger.org.apache.component=ERROR,stdout 
log4j.logger.httpclient.wire=ERROR,stdout 
log4j.logger.org.apache.commons.httpclient=ERROR,stdout 

以下,但我仍然得到警告,當我跑我的HttpClient代碼...我這麼想嗎? 謝謝!

WARN [pool-1-thread-69] (ResponseProcessCookies.java:126) - Cookie rejected: "[version: 0][name: webtb_state][value: method%3Dsu 

回答

2

ResponseProcessCookies是在org.apache.http.client.protocol包,你似乎並沒有把覆蓋。也許去org.apache.http.client

(您可能還需要加設置爲false;它是因爲我已經配置log4j的一段時間)

+0

工作!謝謝 :) – James 2010-07-14 17:18:16