English 中文(简体)
从伐木到LogCat的3级特定缔约方配对和系统信息
原标题:Disallow specific 3rd party apps and system message from logging to the LogCat

是否有办法迫使具体的系统/3级政党申请标语永远不会在DDMS工具记录中被gged(或显示)?

假设情况:

我的公司QA测试器和Anders严重依赖于对LogCat的标识进行微调。 有一个已知的问题I ve读到有关DDMS和Eclipse的大量信息,在撰写这么多的标识信息(约10 000份)之后,ID将只显示1-5条线,并在撰写新标识时参考(。 这一工作是,一旦我们点上了,即清除这些标志,然后我们就可以再次看到所有标志。

不幸的是,如果对某些装置进行测试,如雷波特或G2X,其他应用或系统信息就会使记录硬化。 例如,在我的G2X中,我每3秒在Wifi接通时就收到这些信息:

09-08 15:20:11.885: DEBUG/StatusBarPolicy(1270): onSignalStrengthsChanged : SignalStrength: 21 -1 -1 -1 -1 -1 -1 gsm
09-08 15:20:11.895: ERROR/PhoneInterfaceManager(2507): getNetworkType = radiotech =  11
09-08 15:20:11.895: ERROR/PhoneInterfaceManager(2507): getNetworkType =  NETWORK_TYPE_HSPA
09-08 15:20:12.605: DEBUG/WifiStateTracker(1106): WiFiStatetracker.java handleMessage event: 8

On the Thunderbolt, one of our QA engineers was receiving the following block of messages once every .3 seconds, referring to GPS:

09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 reading data.
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 received CALL.
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 waking up callback thread.
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 dispatching RPC call (XID 2711,     xdr 0x4f66a8) for callback client 3100008c:00050001.
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 cloning XDR for callback client 3100008c:00050001.
09-08 14:50:30.950: INFO/RPC(1574): CLONED fd 119 --> 107
09-08 14:50:30.950: INFO/RPC(1574): 3000008c:00050000 marking input buffer as free.
09-08 14:50:30.950: INFO/RPC(1574): reading on fd 107 for 3100008c:327681
09-08 14:50:30.950: INFO/RPC(1574): START: SVC DISPATCH 3100008c:00050001 --> 00000001
09-08 14:50:30.950: INFO/RPC(1574): 3100008c:327681 sending RPC reply (XID 2711)
09-08 14:50:30.950: INFO/RPC(1574): DONE: SVC DISPATCH 3100008c:00050001 --> 00000001
09-08 14:50:30.950: INFO/RPC(1574): CLOSING fd 107

这将使DDMS能够在不到一分钟的时间内进入全面的缓冲状态,比我们的QA工程师能够进行测试并检查我们的应用记录。

现在,我想不要首先显示这些讯息,因此我们不会打上这一缓冲限制。

我们的镜子确实使用重力和过滤器。 然而,当我们建立一个新的带刺铁窗,加上我们想要看到的严酷/过滤器时,由于拖欠的洛卡表从任何地方获得所有记录,我们就打了这一缓冲上限。 因此,用过滤器/相容进行的工作似乎并不可行。

了解情况的工作:

典型的情况是,如果可以识别,我们就试图放弃正在pa上标志的服务/应用。 然而,如果我们想测试全球定位系统的功能,那么我们就会打上缓冲极限。

可能的解决办法:

下面的共同认识使我对其他途径有了很好的了解。

  1. Build my own UI, and then I won t run into that UI buffer limit and the DDMS UI will automatically clear itself.
  2. Possibly have people use everything command line, and explicitly filter (get away from the UI since the problem is there and not the logs).

如果我开始着手建立一个不同的国际统一制度,或者如果我确实发现这个问题的一枚银弹,显示只有1-5个标识的DDMS UI。

最佳回答

是否有办法迫使具体的系统/3级政党申请标语永远不会在DDMS工具记录中被gged(或显示)?

如@Torid所示,你可以通过多种手段在LogCat过滤。 你们不能阻止其他申请,也不能阻止非洲顾问办公室进行伐木,而不用写你的自己的坚定信息。

有一个已知的问题,即I ve与DDMS和Eclipse一起读到许多日志信息(约10 000美元)之后,ID将只显示1-5条线,并在新日志撰写时提及自己。

考虑到伐木区是64KB环绕缓冲区,这些装置在大部分时间都有超过10K条电文,因为大部分电文都很短。

下一步工作是,一旦我们打过这个点,即清除这些标志,然后我们就可以再次看到所有标志。

由于“清理记录”并不明确标识(在DDMS中设置一个基于时间的过滤器),你的问题在于LogCat UI,而不是伐木本身。 Follow @Torid s recommendations. 如果你无法按照你的意愿进行过滤,则欢迎你将自己的“国际交易日志”作为数据来源。

问题回答

EclipselogCat窗有两套功能(高于右面),可帮助......

  • You can filter logs by severity, which might hide many of the problem logs form other apps/services.
  • You can have your apps use a particular log TAG - for example Log.d("MyTestApp", "onCreate"); and then set up a LogCat filter for that Tag. You can still see what the other apps ar doing (if you want to) by going to the default Tab, but can concentrate on your logs in your filter tab.




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签