0
我使用HTTP類,使大量的GET/POST請求,並得到垃圾郵件很多的logcat:如何禁用HTTP類的logcat的輸出
04-05 10:26:21.662: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.max-redirects': null
04-05 10:26:21.662: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.route.forced-route': null
04-05 10:26:21.662: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.route.local-address': null
04-05 10:26:21.662: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.route.default-proxy': null
04-05 10:26:21.662: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.conn-manager.timeout': null
04-05 10:26:21.662: I/org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager(6644): ThreadSafeClientConnManager.getConnection: HttpRoute[{}->http://<ADDRESS>], timeout = 0
04-05 10:26:21.662: I/org.apache.http.impl.conn.tsccm.ConnPoolByRoute(6644): Total connections kept alive: 0
04-05 10:26:21.662: I/org.apache.http.impl.conn.tsccm.ConnPoolByRoute(6644): Total issued connections: 0
04-05 10:26:21.662: I/org.apache.http.impl.conn.tsccm.ConnPoolByRoute(6644): Total allocated connection: 0 out of 20
04-05 10:26:21.662: I/org.apache.http.impl.conn.tsccm.ConnPoolByRoute(6644): No free connections [HttpRoute[{}-><ADDRESS>]][null]
04-05 10:26:21.662: I/org.apache.http.impl.conn.tsccm.ConnPoolByRoute(6644): Available capacity: 2 out of 2 [HttpRoute[{}-><ADDRESS>]][null]
04-05 10:26:21.662: I/org.apache.http.impl.conn.tsccm.ConnPoolByRoute(6644): Creating new connection [HttpRoute[{}-><ADDRESS>]]
04-05 10:26:21.662: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.connection.stalecheck': null
04-05 10:26:21.672: I/org.apache.http.impl.client.DefaultRequestDirector(6644): Stale connection check
04-05 10:26:21.672: I/org.apache.http.impl.client.DefaultRequestDirector(6644): Stale connection detected
04-05 10:26:21.672: I/org.apache.http.impl.conn.DefaultClientConnection(6644): Connection closed
04-05 10:26:21.672: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.connection.timeout': 10000
04-05 10:26:21.882: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.tcp.nodelay': null
04-05 10:26:21.882: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.socket.timeout': 15000
04-05 10:26:21.892: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.socket.linger': null
04-05 10:26:21.892: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.socket.buffer-size': null
04-05 10:26:21.892: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.element-charset': null
04-05 10:26:21.902: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.connection.max-line-length': null
04-05 10:26:21.902: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.element-charset': null
04-05 10:26:21.902: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.connection.max-header-count': null
04-05 10:26:21.912: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.connection.max-line-length': null
04-05 10:26:21.912: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.connection.max-status-line-garbage': null
04-05 10:26:21.912: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.virtual-host': null
04-05 10:26:21.912: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.default-headers': null
04-05 10:26:21.912: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.version': null
04-05 10:26:21.912: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.useragent': null
04-05 10:26:21.912: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.version': null
04-05 10:26:21.912: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.expect-continue': false
04-05 10:26:21.922: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.cookie-policy': null
04-05 10:26:21.922: I/org.apache.http.client.protocol.RequestAddCookies(6644): CookieSpec selected: best-match
04-05 10:26:21.922: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.cookie-datepatterns': null
04-05 10:26:21.922: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.single-cookie-header': null
04-05 10:26:21.922: I/org.apache.http.impl.client.DefaultRequestDirector(6644): Attempt 1 to execute request
04-05 10:26:21.922: I/org.apache.http.impl.client.ClientParamsStack(6644): 'http.protocol.version': null
04-05 10:26:21.922: I/org.apache.http.wire(6644): >> "POST /aap.do HTTP/1.1[EOL]"
04-05 10:26:21.922: I/org.apache.http.wire(6644): >> "Content-Length: 567[EOL]"
04-05 10:26:21.932: I/org.apache.http.wire(6644): >> "Content-Type: application/octet-stream[EOL]"
04-05 10:26:21.932: I/org.apache.http.wire(6644): >> "Host: <ADDRESS>[EOL]"
04-05 10:26:21.932: I/org.apache.http.wire(6644): >> "Connection: Keep-Alive[EOL]"
04-05 10:26:21.932: I/org.apache.http.wire(6644): >> "[EOL]"
(...)
我找遍了整個網絡,不能相信沒有人真的發佈了一種方法來禁用它!任何人?
編輯
要清楚 - 我知道我可以過濾/中釋放等由ProGuard的刪除 - 這些日誌的開發過程中我想做的事情就是擺脫(不過濾) 。
如果你只是在你的日食觀察'Logcat',您可以在logcat中添加一個'filter'。 – SudoRahul 2013-04-05 08:39:56
請檢查此線程:Android日誌記錄 http://stackoverflow.com/questions/2018263/android-logging – Amit 2013-04-05 08:41:08
請參閱我的*編輯*部分。 – 2013-04-05 08:45:51