Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logcat filtering?

Tags:

android

I'd like to filter out everything from the log, except for my app's processes. I know that I can specify priority levels, but I want to be able to do more than that. I wanna get rid of all the other stuff that's going on in the phone that's being logged. How can I do this?

like image 306
LuxuryMode Avatar asked Jun 19 '11 22:06

LuxuryMode


People also ask

What is the purpose of Logcat?

Logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that you have written from your app with the Log class. This page is about the command-line logcat tool, but you can also view log messages from the Logcat window in Android Studio.

What is verbose in Android Logcat?

Verbose - Show all log messages (the default). Debug - Show debug log messages that are useful during development only, as well as the message levels lower in this list. Info - Show expected log messages for regular usage, as well as the message levels lower in this list.

What is PID in Logcat?

pid = process ID. uid = user ID of the application that owns that process. gid = group IDs of the application that owns that process.


1 Answers

If you're viewing the logs in the Eclipse debug view, you can do this very easily by just clicking the Create Filter button (green + sign).

If not using Eclipse, specify the filter on the command line as follows (example from the Android docs):

Here's an example of a filter expression that suppresses all log messages except those with the tag "ActivityManager", at priority "Info" or above, and all log messages with tag "MyApp", with priority "Debug" or above:

adb logcat ActivityManager:I MyApp:D *:S
like image 133
Graham Borland Avatar answered Oct 03 '22 00:10

Graham Borland