简体   繁体   中英

How to exclude certain error from Android Studio logcat?

I am creating an android app, and i get spammed by a certain error(not affecting the app functionality). I have like 300k + errors in 5 seconds. I cannot view other errors from my app because of this spam.

Error is as following:

10-12 19:58:25.248  20268-20287/com.example.boacterapp.Pages E/ParseCommandCache﹕saveEventually thread had an error.
java.lang.IllegalStateException: Tried to serialize a command referencing a new, >unsaved object.
at com.parse.ParseCommand.resolveLocalIds(ParseCommand.java:472)
at com.parse.ParseCommand.onPreExecute(ParseCommand.java:371)
at com.parse.ParseRequest$7.then(ParseRequest.java:299)
at com.parse.ParseRequest$7.then(ParseRequest.java:296)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.continueWithTask(Task.java:364)
at com.parse.ParseRequest.executeAsync(ParseRequest.java:296)
at com.parse.ParseRequest.executeAsync(ParseRequest.java:286)
at com.parse.ParseCommandCache.maybeRunAllCommandsNow(ParseCommandCache.java:487)
at com.parse.ParseCommandCache.runLoop(ParseCommandCache.java:611)
at com.parse.ParseCommandCache.access$000(ParseCommandCache.java:26)
at com.parse.ParseCommandCache$2.run(ParseCommandCache.java:146)

Is there a way to apply a filter to exclude a certain error from the logcat?

Thank you in advance.

Try to change the filters in Logging with your package name Attach a custom log_tag for each class at starting of the class

private static String LOG_TAG = MyClass.class.getName();

In Filter Configuration give your MyClass.class.getName() to filter out

In error log use Log.e(LOG_TAG,"message") this reduce number of loggings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM