我有一个日志猫,它输出到文本文件,但找不到每个部分的含义。例如,我有以下内容:
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.(LoadedApk.java:969)
我不确定每个部分代表什么意思,我假设W /表示警告,E /表示错误。但不确定文本是否在斜杠之后。我也不确定括号中的数字。
感谢您的任何帮助,您可以提供。
只需将logcat的输出与DDMS中显示的输出进行比较,就可以轻松理解这一点。这是一个例子:
Logcat输出:
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屏幕截图:
屏幕截图的第一行分析:
“ E”是日志级别
QC-DSS-LIB是标签
“ 74”是进程ID
如果您还希望从logcat获取时间戳,请使用以下-v
开关:
logcat -v time
这将以以下格式给出输出:
02-16 09:58:21.446 E/QC-DSS-LIB( 74): unrecognized ifi_index 15