如何过滤logcat的输出ACRA? [英] How to filter logcat output in ACRA?

查看:347
本文介绍了如何过滤logcat的输出ACRA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是用我的应用程序ACRA库。我调试消息写入与日志类的方法logcat中。就在这个消息中含有90%的重要信息。 logcat的输出包括在我的报告。当我在模拟器中运行它,它仅包含我的消息以及来自的printStackTrace()方法输出(因为我想要的)。但是,当我在真机上运行(SGS4)我得到了太多不必要的信息。例如:

I am using ACRA library in my application. My debug messages write into logcat with methods from Log class. And just this messages contains 90% important information. Logcat output is included in my report. When I run it on emulator it contains only my messages and output from printStackTrace() method (as I want). But when I run it on real device (SGS4) I get too many unnecessary messages. For example:

D/ProgressBar(10716): setProgressDrawable mProgressDrawable = null, d = android.graphics.drawable.LayerDrawable@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 = LIST_SCROLL_BOOSTER@5
I/CustomFrequencyManager(10716): Boost Request from package = LIST_SCROLL_BOOSTER@5 frequency : 800000type = 6
I/CustomFrequencyManager(10716): !! pkgName = LIST_SCROLL_BOOSTER@5
I/CustomFrequencyManager(10716): Request from package name pkgName = LIST_SCROLL_BOOSTER@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

logcat的堵塞用约90%的该消息。但是,我没有必要在这个消息。如何正确筛选呢?

Logcat is clogged with this messages about 90%. But I not needed in this messages. How filter it correctly?

现在我使用这样的:

logcatArguments = { "-t", "300", "ru.bartwell.myapp:V" }

此外,我知道我可以写我自己的日志,只有我的信息,然后将其包括ACRA报告。但是,这是正确的,使写入文件,这样频繁?恐怕是SD卡上造成不良影响。

Also I know that I can write my own log with my messages only and then include it to ACRA report. But is this correct to make writing into file so often? I'm afraid that is adversely affect on SD-card.

推荐答案

您可以参考以下链接:

https://github.com/ACRA/acra/wiki/AdvancedUsage

For example, if you prefer using:

亚行logcat -t 100 -v长ActivityManager:我MYAPP:D的:•
然后将它添加到您{} @ReportsCrashes配置:
  logcatArguments = {-t,100,-v,长,ActivityManager:I,MyApp的:D,
的:S}

尽量提供更具体到logcatArguments命令。

try to provide more specific into logcatArguments command.

写入到SD卡所以往往是不正确的选项。

writing into the sdcard so often is not the correct option.

这篇关于如何过滤logcat的输出ACRA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆