了解logcat的输出写入文件时, [英] understanding logcat output when written to file

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

问题描述

我有被输出到一个文本文件,但找不到了每个部分是指任何一个日志猫。例如,我有以下几点:

I have a log cat which is outputted to a text file but can't find anything on what each part means. For example, I have the following:

W/Trace   (  857): Unexpected value from nativeGetEnabledTags: 0

E/ActivityThread(  565): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d35408 that was originally bound here

E/ActivityThread(  565): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d35408 that was originally bound here

E/ActivityThread(  565):    at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)

我不知道每个部分意味着我认为W /意味着它的一个警告,E /意味着它的一个错误。但不知道该文本是斜线后。我也不能肯定的号码在括号内的内容。

I'm not sure what each part means I assume W/ means its a warning and E/ means its an error. But not sure the text is after the slash. I'm also not sure what the number is in the brackets.

感谢您的帮助,您可以提供。

Thanks for any help you can provide.

推荐答案

这可以很容易地通过简单比较的logcat的输出,在DDMS显示的理解。这里有一个例子:

This can be easily understood by simply comparing the output of logcat with that displayed in DDMS. Here's an example:

logcat的输出:

Logcat output:

E/QC-DSS-LIB(   74): unrecognized ifi_index 15
D/wpa_supplicant(19367): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(19367): RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
D/wpa_supplicant(19367): Wireless event: cmd=0x8c02 len=27
D/wpa_supplicant(19367): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(19367): RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
D/wpa_supplicant(19367): Wireless event: cmd=0x8c02 len=33
D/WifiStateTracker(  123): Reset connections and stopping DHCP

DDMS截图:

DDMS screenshot:

从截图中第一行的分析:

Analysis of the first line from the screenshot:

  • 在E是日志级别
  • QC-DSS-LIB的标签
  • 在74的进程ID

如果你希望得到的时间戳也从logcat中,使用 -v 开关是这样的:

If you wish to get the timestamp also from logcat, use the -v switch like this:

logcat -v time

这将使输出格式为:

which would give an output in this format:

02-16 09:58:21.446 E/QC-DSS-LIB(   74): unrecognized ifi_index 15

这篇关于了解logcat的输出写入文件时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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