5

I'd like to know how to filter logcat messages that has nothing to do with my app. There's so much logcat crap that it is practically worthless because it just keeps scrolling because of all the internal things.

I wish to remove messages like the following:

1224-1616/system_process E/WindowState﹕ getStack: Window{344506b0 u0 Loggin in...} couldn't find taskId=38 Callers=com.android.server.wm.WindowState.getDisplayContent:762 com.android.server.wm.WindowState.getDisplayId:767 com.android.server.wm.InputMonitor.updateInputWindowsLw:288 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner:9936
1224-1475/system_process W/ActivityManager﹕ Unbind failed: could not find connection for android.os.BinderProxy@ae6f48b
1224-1384/system_process I/ActivityManager﹕ START u0 {act=android.intent.action.VIEW cmp=com.android.packageinstaller/.UninstallAppProgress (has extras)} from uid 10037 on display 0
...
1705-1774/com.google.android.gms I/GoogleHttpClient﹕ Falling back to old SSLCertificateSocketFactory
1705-1705/com.google.android.gms I/ConfigFetchService﹕ fetch service done; releasing wakelock

I only want my prints, Exceptions caused by my app, and nothing else.

Cœur
  • 37,241
  • 25
  • 195
  • 267
theAnonymous
  • 1,701
  • 2
  • 28
  • 62

2 Answers2

9

Assuming you're using Android Studio or Intelij, on the right-hand-side of Logcat's upper toolbar select "Only show selected application" from the dropdown. Then from the dropdown to the left select the process of the application your wish to see logs for.

A filter can be used to remove logs from the Dalvik VM. In the dropdown on the right of Logcat select "Edit Filter Configuration". Into "Log Tag (regex)" type ^(?!(dalvikvm)). Into "Package Name" type the package of the application your running.

enter image description here

Josh Taylor
  • 171
  • 1
  • 7
  • 1
    Wonderful, cut down all those craps and clean as what I see in Eclipse now. Thanks. – TPG Jun 24 '15 at 04:32
0

In Android Studio Dolphin's new release you can simply add package:mine in the Logcat search bar. This filter will only show the messages you are concerned with (your local app logs and errors.)

Read more about Logcat searh here

Shoaib Kakal
  • 1,090
  • 2
  • 16
  • 32