A
A
Artem2013-11-21 10:25:50
Android
Artem, 2013-11-21 10:25:50

How to filter LogCat output for ACRA?

I decided to use the ACRA library in my project to generate and deliver reports from users about the application's operation. All my debug messages are written to LogCat using the methods of the Log class. They are included in the report and they contain 90% of valuable information. And if the log from the emulator contains only what I need (namely, my messages and information from printStackTrace()), then from the real device (SGS4) a huge pile of unnecessary lines also comes, for example:

D/ProgressBar(10716): setProgressDrawable mProgressDrawable = null, d = [email protected]4257df18needUpdate = false
D/ProgressBar(10716): setProgressDrawable drawableHeight = 0
D/ProgressBar(10716): setProgress = 0
D/ProgressBar(10716): setProgress = 0, fromUser = false
D/ProgressBar(10716): mProgress = 0mIndeterminate = false, mMin = 0, mMax = 100
D/ProgressBar(10716): updateDrawableBounds: bottom = 228
I/endeffect(10716): AbsListView.onMeasure(), getWidth()=750, getHeight()=1689, this=android.widget.ListView{427234a0 VFED.VC. ......ID 0,0-750,1689 #7f070083 app:id/menu_list}
I/endeffect(10716): AbsListView.onMeasure(), getWidth()=750, getHeight()=1689, this=android.widget.ListView{427234a0 VFED.VC. ......ID 0,0-750,1689 #7f070083 app:id/menu_list}
D/AbsListView(10716): unregisterIRListener() is called 
D/AbsListView(10716): unregisterIRListener() is called 
D/AbsListView(10716): unregisterIRListener() is called 
D/AbsListView(10716): unregisterIRListener() is called 
D/AbsListView(10716): unregisterIRListener() is called 
D/AbsListView(10716): Get MotionRecognitionManager
D/AbsListView(10716): Get MotionRecognitionManager
W/Resources(10716): Converting to string: TypedValue{t=0x10/d=0x3c a=-1}
W/Resources(10716): Converting to string: TypedValue{t=0x10/d=0x3c a=-1}
I/CustomFrequencyManager(10716): newFrequencyRequest  - mFrequency = 800000, mTimeoutMs = -1, mPkgName = [email protected]5
I/CustomFrequencyManager(10716): Boost Request from package = [email protected]5 frequency : 800000type = 6
I/CustomFrequencyManager(10716): !! pkgName = [email protected]5
I/CustomFrequencyManager(10716): Request from package name pkgName = [email protected]5
I/CustomFrequencyManager(10716): mToken is Null....Creating New Binder!
I/CustomFrequencyManager(10716): CPUDVFSControlRequest : doFrequencyRequest::  = 800000 Timeout : -1
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(10716): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

And with these lines, 90 percent of the entire log is clogged. I don't see any value in them. How to weed them out correctly so as not to hurt useful information?
Now the following line is used in the library settings:
logcatArguments = { "-t", "300", "ru.bartwell.myapp:V" }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2013-11-23
@bartwell

Here is my solution:

logcatArguments = { "-t", "300", "MyAppTag:V", "System.err:V", "AndroidRuntime:V", "*:S" }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question