Is there a way, to force specific system/3rd party application tags to never be logged (or shown) in the DDMS tool's Logcat?
The scenario:
My company's QA testers and Android developers rely heavily on looking at the logs in the LogCat to triage our application. There is a known issue I've read a lot about with DDMS and Eclipse where after so many log messages are written (~10,000), the UI will only display 1-5 lines and refersh itself whenever new logs are written (http://code.google.com/p/android/issues/detail?id=2752). The workaround for this is to clear the logs once we hit this point and we can then see all the logs again.
Unfortunately when testing on some devices, such as the Thunderbolt or G2X, other applications or system messages will spam the logs hard. For example on my G2X I get these messages once every 3 seconds when connected to Wifi:
09-08 15:20:11.885: DEBUG/StatusBarPolicy(1270): onSignalStrengthsChanged : SignalStrength: 21 -1 -1 -1 -1 -1 -1 gsm
09-08 15:20:11.895: ERROR/PhoneInterfaceManager(2507): getNetworkType = radiotech = 11
09-08 15:20:11.895: ERROR/PhoneInterfaceManager(2507): getNetworkType = NETWORK_TYPE_HSPA
09-08 15:20:12.605: DEBUG/WifiStateTracker(1106): WiFiStatetracker.java handleMessage event: 8
On the Thunderbolt, one of our QA engineers was receiving the following block of messages once every .3 seconds, referring to GPS:
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 reading data.
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 received CALL.
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 waking up callback thread.
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 dispatching RPC call (XID 2711, xdr 0x4f66a8) for callback client 3100008c:00050001.
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 cloning XDR for callback client 3100008c:00050001.
09-08 14:50:30.950: INFO/RPC(1574): CLONED fd 119 --> 107
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 marking input buffer as free.
09-08 14:50:30.950: INFO/RPC(1574): reading on fd 107 for 3100008c:327681
09-08 14:50:30.950: INFO/RPC(1574): START: SVC DISPATCH 3100008c:00050001 --> 00000001
09-08 14:50:30.950: INFO/RPC(1574): 3100008c:327681 sending RPC reply (XID 2711)
09-08 14:50:30.950: INFO/RPC(1574): DONE: SVC DISPATCH 3100008c:00050001 --> 00000001
09-08 14:50:30.950: INFO/RPC(1574): CLOSING fd 107
This would cause DDMS to get into the full buffer state in less than a minute, faster than our QA engineer can perform their test and check out our application's logs.
Now I would like a way to never have these messages show up in the first place, so we do not hit this buffer limit.
Our app does use severity and filter tags. However in DDMS when we create a new tabbed window with the severity/filter we want to view, since the default Log tab gets all logs from anywhere, we hit this buffer ceiling. So a workaround with filter/severity does not seem to work.
Known workarounds:
Typically we try to turn off the service/application that is spamming the logs, if identifiable. However, if we want to test GPS functionality, then we hit the buffer limit.
Possible Solutions:
Commonware below gave me some good insight on alternative paths.
- Build my own UI, and then I won't run into that UI buffer limit and the DDMS UI will automatically clear itself.
- Possibly have people use everything command line, and explicitly filter (get away from the UI since the problem is there and not the logs).
I'll try to update this if I ever get around to building a different UI, or if I ever do find a silver bullet to this issue of the DDMS UI showing only 1-5 logs after X logs get written.