如何在logcat Android Studio中排除日志标签? [英] How to exclude Log Tag in logcat Android Studio?

查看:608
本文介绍了如何在logcat Android Studio中排除日志标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定是否曾经问过这种问题(我曾用Google进行过搜索,但未找到解决问题的正确方法).

I'm not sure if this kind of question been asked before (I did Google it but not found the proper way to solve my question).

我希望我可以从项目中使用的库中禁用(排除)日志标签.

我尝试进入 Logcat控制台>编辑过滤器配置>日志标记(regex),但是在这里,每次创建时,我都必须添加新的日志标记. (而且这种方式不会在我的logcat中显示任何异常)

I tried to go in Logcat console > Edit Filter Configuration > Log Tag(regex) but here I have to add new Log Tag every time I create it. (and this way will not show any exception in my logcat)

与本主题相同如何在Android Studio中过滤logcat?我按照@dmsherazi的建议选择了选择正在运行的进程,但我仍然可以从库中看到很多日志标记.

Same as this topic How to filter logcat in Android Studio? I selected select the process running as @dmsherazi suggest but I still can see lots of log tag from libraries.

那么,有没有一种方法可以排除android studio中的特定日志标记(我正在使用v1.2 beta3)?

So, is there a way to exclude specific log tag in android studio (I'm using v1.2 beta3)?

推荐答案

抱歉,在问了20分钟后回答了我自己的问题. 我朋友刚刚给我发送了一个链接,可以解决我的问题

I'm sorry for answering my own question after 20 minutes of asking. My friend just sent me a link that solves my question

这里是:如何使用Android adb logcat通过TAG名称排除某些消息?

适用于android studio用户

for android studio users

转到 Logcat控制台>编辑过滤器配置>日志标记(regex),然后 改成这个

^(?!(EXCLUDE_TAG1|EXCLUDE_TAG2))

请注意,EXCLUDE_TAG1和EXCLUDE_TAG2是您从logcat中排除的日志标签.

note that EXCLUDE_TAG1 and EXCLUDE_TAG2 are Log Tag you exclude from logcat.

这篇关于如何在logcat Android Studio中排除日志标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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