I have a single android device attached to the pc and have opened multiple shells which show logcat information. Everyone running with its specific filter.
So my question is now, where are those filters applied? Already on the phone so only the filtered messages are sent over usb. Or are they applied on the pc on the adb server or client? I just want to prevent having multiple unfiltered logcat streams running simultaneous over the usb since I have limited bandwitdh.
Thanks
I have a single android device attached to the pc and have opened multiple
Share
The data is pulled out of kernel buffers with the
logcatcommand on the device. If you run% adb logcat -\?you can see the usage info, which includes a description of “filterspecs”. These can be set on the command line, or by setting the
ANDROID_LOG_TAGS. For example:% adb logcat '*:W'will show you only messages at Warning or Error level.
The trick here is that
adb logcatis just shorthand foradb shell logcat, with the added bonus of propagating yourANDROID_LOG_TAGSenvironment variable to the device. The filtering is being done by thelogcatcommand, which is just dumping text output over adb. The output from thelogcatcommand doesn’t get any special treatment.So the answer to your question is: the filtering happens on the device, individually for each window.
DDMS works differently.