我在我的應用程序中使用ACRA庫。我的調試消息使用Log類的方法寫入logcat。而這條消息包含了90%的重要信息。 Logcat輸出包含在我的報告中。當我在模擬器上運行它時,它只包含我的消息和printStackTrace()方法的輸出(如我所願)。但是當我在真實設備(SGS4)上運行它時,我得到了太多不必要的消息。例如:如何篩選ACRA中的logcat輸出?
D/ProgressBar(10716): setProgressDrawable mProgressDrawable = null, d = [email protected] = 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]
I/CustomFrequencyManager(10716): Boost Request from package = [email protected] frequency : 800000type = 6
I/CustomFrequencyManager(10716): !! pkgName = [email protected]
I/CustomFrequencyManager(10716): Request from package name pkgName = [email protected]
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
Logcat被這條消息堵塞了大約90%。但是我不需要這個消息。如何正確過濾?
現在我用這:
logcatArguments = { "-t", "300", "ru.bartwell.myapp:V" }
而且我知道我可以寫我自己的日誌,只有我的信息,然後將其包括對ACRA報告。但是,這是正確的,以便經常寫入文件?我擔心這會對SD卡造成負面影響。