android - Filter out certain logs from logcat -
i'm using 3rd party library has bug spews out error message in logcat. happens multiple times per second. text same. makes debugging hard it:
- makes logcat scroll fast
- makes hard find relevant logs
- fills whole logfile, deleting older logs (often minute old or so)
i assume not performance that's not real issue.
while waiting fix in library, i filter out specific error message logcat. can see except 1 error , it's stacktrace.
can filter out using android studio? if filtered, messages still deleted if file full?
i know how disable logs using proguard. have solution without proguard since in development version proguard disabled.
1- can add tag specific logs when creating them:
log.i("mytag", msg);
and in logcat filter them ike this:
tag:mytag
2- filter logs app filter logcat typing :
app:com.example.yourappname
edit: due comments:
3- filter logs created thread, @ run time find log want filter same logs. see tid column , filter logcat tid (thread id)
note every time app run again , should again.
Comments
Post a Comment