Android ADB命令获取Windows的应用程序特定登录命令提示符 [英] Android ADB command to get the application specific log in command prompt of windows

查看:95
本文介绍了Android ADB命令获取Windows的应用程序特定登录命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows的命令提示符中获取应用程序特定的日志

Hi i want to get the application specific log in the command prompt of windows i tried this

过滤LogCat仅从Android中的我的应用程序中获取消息吗?

adb -d logcat com.mycompanyname.demoapp:I *:S

但是对我来说不起作用,正在打印大量日志,这对我来说很难找到我的应用程序专用日志。

But didn't work for me huge log was printing which was very difficult for me to find my app specific log.

我要在命令提示符下打印我的应用特定登录。

I want to print my app specific log in command prompt.

推荐答案

logcat的字符串用于过滤的不是程序包名称,而是标签

The string that logcat uses for filtering by is not a package name but a TAG.

因此 logcat com.mycompanyname.demoapp:* 不会除非使用名称作为日志记录标记的软件包进行编译,否则该软件包将无法正常工作。

So logcat com.mycompanyname.demoapp:* won't work unless the package was compiled with its name used as the logging tag.

有一种可与Android 7.0+设备一起使用的解决方法:

There is a workaround you can use with Android 7.0+ devices:

adb shell "logcat --pid=$(pidof -s com.mycompanyname.demoapp)"

此命令找出来软件包的进程ID ,然后将其用于 logcat 过滤。

This command finds out the process ID for the package and then uses it for logcat filtering.

这篇关于Android ADB命令获取Windows的应用程序特定登录命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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