如何筛选邮件的logcat在日食? [英] How to filter messages to Logcat in eclipse?

查看:115
本文介绍了如何筛选邮件的logcat在日食?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想显示的System.out.println的消息从我目前正在运行的应用程序的logcat。我已经检查从堆栈溢出和其他许多建议。但我得到的是一样的建议增加亚行-d logcat的com.example.example:我的:S......等,但我不知道在哪里添加此。我知道如何打开logcat的过滤器设置窗口。它显示了一个名为筛选器名称''通过日志标签'通过日志消息'由PID'应用程序名称'的项目,,,,,和'通过日志级别。结果
                                                                                                                                             还有一件事。我添加了一个过滤器^(?!
的(nativeGetEnabledTags))。* $中的通过日志消息项目,并设法通过像nativegetenabledtags意外值的消息,以避免logcat的窗口泛滥。但问题是,我在Eclipse中,每当我运行一个应用程序中添加这一切的时候(即使是相同的程序)。有没有什么办法可以添加过滤器的永久?

I want to show only system.out.println messages to logcat from my currently running application. I have already checked many suggestions from stack overflow and others. But all I got is suggestions like " add adb -d logcat com.example.example:I :S"... etc. But I don't know where to add this. I know how to open logcat filter settings window. It shows items named 'filter name', 'by log tag', 'by log message', 'by PID', 'by application name', and 'by log level'.
One more thing. I have added a filter with "^(?!.
(nativeGetEnabledTags)).*$" in the 'by log message' item and managed to avoid the flooding of logcat window by a message like "unexpected value from nativegetenabledtags". But the problem was, I have to add this all the time whenever I run an application(even if it is the same program) in eclipse. Is there any way to add filters for permanently?

在此先感谢...

推荐答案

我觉得最简单的方法就是使用TAG。

I think the easiest way is to use TAG.

当你从你的Andr​​oid应用程序,例如日志 Log.d ,第一个参数是一个标记字符串。所以,如果你将它设置为唯一的字符串(如您的应用程序的名称),那么你可以稍后它在Eclipse中进行筛选。

When you log from your android app, e.g. Log.d, the first parameter is a TAG string. So if you set it up to a unique string (like your app name) then you can later filter by it in Eclipse.

这篇关于如何筛选邮件的logcat在日食?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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