logcat的过滤? [英] Logcat filtering?

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

问题描述

我想从日志中过滤掉一切,除了我的应用程序的过程。我知道,我可以指定优先级,但是我希望能够做更多的事。我想摆脱所有其他的东西,在这正在被记录的电话怎么回事。我怎样才能做到这一点?

解决方案

如果您正在查看在Eclipse调试视图的日志,您可以通过点击创建过滤器按钮(绿色+符号)做到这一点很容易。

如果不使用Eclipse,请在命令行上的过滤器,如下所示(例如从Android文档):

  

下面是一个过滤器前pression的SUP presses所有日志消息除了那些标签ActivityManager,以优先级信息或以上,并与标签MyApp的所有日志消息的一个例子,优先级调试​​或以上:

 亚行logcat ActivityManager:我的MyApp:D *:•
 

I'd like to filter out everything from the log, except for my app's processes. I know that I can specify priority levels, but I want to be able to do more than that. I wanna get rid of all the other stuff that's going on in the phone that's being logged. How can I do this?

解决方案

If you're viewing the logs in the Eclipse debug view, you can do this very easily by just clicking the Create Filter button (green + sign).

If not using Eclipse, specify the filter on the command line as follows (example from the Android docs):

Here's an example of a filter expression that suppresses all log messages except those with the tag "ActivityManager", at priority "Info" or above, and all log messages with tag "MyApp", with priority "Debug" or above:

adb logcat ActivityManager:I MyApp:D *:S

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

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