Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logcat suppression - How to get rid of all the internal crap that is unwanted?

Tags:

android

logcat

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.

like image 958
theAnonymous Avatar asked May 28 '15 23:05

theAnonymous


1 Answers

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

like image 114
Josh Taylor Avatar answered Nov 15 '22 07:11

Josh Taylor