通过应用程序在ACRA中过滤LogCat,而不使用TAG [英] Filtering LogCat in ACRA by application and not using TAG

查看:314
本文介绍了通过应用程序在ACRA中过滤LogCat,而不使用TAG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用ACRA来捕获错误并改善我的应用程序。我想在Logcat中过滤由于我的应用程序运行而生成的所有日志,不仅包括我的应用程序生成的日志,还包括由应用程序(如GooglePlay)使用的库生成的日志。



通常我所看到的建议是通过TAG进行过滤,但这不允许我看到我没有标记的日志(例如,ACRA ...)



在eclipse中有一个解决方案,我可以使用TAG进行过滤,也可以使用应用程序名称和/或其进程ID进行过滤。这是我想要做的,过滤我的应用程序名称的logcat输出发送到ACRA。



我想在logcat中使用一个命令来重现以下选项I在eclipse中选择:





最后问题是在logcat级别。可以使用按应用程序进行筛选的adb级别来过滤logcat,而不是通过TAG过滤。



对于所有应用程序日志,唯一的选项是单独的TAG?另一种方式是过滤所有以xxxx开头的TAG,但是我没有在google中找到任何例子,而不是使用*。



Linux shell(如grep)不可行,我已经通过ACRA传递信息来测试它。

解决方案

Trebia ,



您的请求的棘手部分是adb logcat吐出PID。我知道通过应用程序名称过滤的唯一方法是编写一个脚本,通过ps来查询操作系统来查找PID。我不知道在eclipse中有什么办法可以自己编辑logcat插件。



如果你使用的是Mac,而且你愿意做外部的过滤器的日食你应该尝试LogRabbit。它可以通过应用程序名称或任何您需要过滤的任何东西进行过滤。除了丰富的过滤器创建者,您保存的过滤器只需一次即可实时过滤。



您可以在这里找到更多信息: http://lograbbit.com/



全面披露我是LogRabbit的创建者。 / p>

I am currently using ACRA for capturing errors and improving my application. I would like to filter in Logcat all logs generated due to my application running which includes not only those that my app generates, but also those that are generated by libraries used by app (like GooglePlay).

Usually what I have seen suggested is filtering by TAG, but that will not allow me to see logs that I have not tagged (like, for instance, ACRA... )

There is a solution in eclipse where I can filter both using TAGs but also by Application name and/or its process ID. That's what I would like to do, filter by my application name the logcat output sent to ACRA.

I would like to use a command in logcat to reproduce the following option I select in eclipse:

Finally the question is at logcat level. Is possible to filter logcat at adb level using a filter by application and not by TAG

Is the only option to have a single TAG for all the application Logs? Another way around I have is to filter "all TAG starting by xxxx", but I have not found any example in google, not using "*".

Any solution using Linux shell (like grep) is not workable, I already tested it as the way the information is passed by ACRA.

解决方案

Trebia,

The tricky part of your request is "adb logcat" spits out PID. The only way I know of to filter by application name is to write a script to query the OS via "ps" to look up the PID. I am not aware of any way to do that within eclipse with out editing the logcat plugin yourself.

If you are using a Mac and you are willing to do the filter outside of eclipse you should try LogRabbit. It can filter by application name or just about any thing else you would need to filter by. In addition to a rich filter creator your saved filters are just one click away for real-time filtering.

You can find more information here: http://lograbbit.com/

Full disclosure I am the creator of LogRabbit.

这篇关于通过应用程序在ACRA中过滤LogCat,而不使用TAG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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