Felix Plaumann Felix Plaumann - 1 year ago 146
Android Question

adb shell Logcat with Package Name

Is it possible to also display the Log's Package Name in each line?


logcat -v long

leaves exactly the package name field (after PID) empty.

I want to filter the Logs from a specific application with different Tags, just wondering if it is possible.

Answer Source

logcat record does not have a "package name field". Therefore there is no standard/built-in way to filter by it.

Although more recent Android versions some changes that made filtering logcat output by binary/package name much more convenient:

adb shell logcat --pid=$(pidof -s <package_name>)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download