Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - adb logcat without debug logs

Tags:

android

adb

I don't want to see debug logs from adb logcat command. There are tons of debug logs from my phone and I don't want to see them.

adb logcat --help says " *:I " will output only info logs but is there any option to filter all logs except debug.

like image 410
Vinoth Avatar asked Jun 13 '12 06:06

Vinoth


People also ask

How do I get adb logs from my Android?

Navigate to device settings and enable Developer Options (see section for ADB logs) Navigate to Developer Options and tap on Take/Submit Bug Report. Select Full Report when prompted to get the full device info along with the logs. The bug report takes up to 2 minutes to be generated.


2 Answers

From the docs here, when you specify a log level filter, it will show all messages at that level and higher. The levels are specified as:

The tag of a log message is a short string indicating the system component from which the message originates (for > example, "View" for the view system).

The priority is one of the following character values, ordered from lowest to highest priority:

  • V: Verbose (lowest priority)
  • D: Debug
  • I: Info
  • W: Warning
  • E: Error
  • F: Fatal
  • S: Silent (highest priority, on which nothing is ever printed)

...

The following filter expression displays all log messages with priority level "warning" and higher, on all tags:

adb logcat *:W 

So with this in mind, passing the filter you mentioned *:I will log everything but Verbose and Debug logs.

Unless your intention is to show Verbose as well as the other log levels, I don't think you can do that because specifying Verbose includes anything above Verbose.

If that is the case, it might be useful for you to filter on a specific tag instead of a specific log level, or some combination of both.

like image 93
brianestey Avatar answered Sep 18 '22 15:09

brianestey


adb logcat *:I will display all logs with priority INFO and higher.

The priority is one of the following character values, ordered from lowest to highest priority:

  • V — Verbose (lowest priority)
  • D — Debug
  • I — Info
  • W — Warning
  • E — Error
  • F — Fatal
  • S — Silent (highest priority, on which nothing is ever printed)

The above information is available in Write and View Logs with Logcat

like image 24
Rajesh Avatar answered Sep 16 '22 15:09

Rajesh