Search code examples
androidadbandroid-logcat

How to substring Android logcat output and show only the message itself


I would like to use logcat and output only the messages themselves. Not the method name, not the time, not the tag - just the message.

Example, from this message:

D/ConnectivityService( 471): Setting tx/rx TCP buffers to 524288,1048576,2097152,262144,524288,1048576

I only want the

Setting tx/rx TCP buffers to 524288,1048576,2097152,262144,524288,1048576

Is that possible ?


Solution

  • Logcat has a format parameter, one of which is the message alone with no metadata.

    adb logcat -v raw
    

    You can still apply filters after this, e.g. *:S ConnectivityService:D, even though the tag is no longer part of the output.