Android S:cmd window logging 和 dumpsys window logging 调试WMS功能

Android S:cmd window logging 和 dumpsys window logging 调试WMS功能

$ cmd window logging
Unknown command
Window manager logging options:
  start: Start proto logging
  stop: Stop proto logging
  enable [group...]: Enable proto logging for given groups
  disable [group...]: Disable proto logging for given groups
  enable-text [group...]: Enable logcat logging for given groups
  disable-text [group...]: Disable logcat logging for given groups
Not handled, calling status bar with args: []

$ dumpsys window logging
WINDOW MANAGER LOGGING (dumpsys window logging)
ProtoLog status: Disabled
Enabled log groups:
  Proto: TEST_GROUP WM_DEBUG_ADD_REMOVE WM_DEBUG_APP_TRANSITIONS WM_DEBUG_APP_TRANSITIONS_ANIM WM_DEBUG_BOOT WM_DEBUG_CONFIGURATION WM_DEBUG_CONTAINERS WM_DEBUG_DRAW WM_DEBUG_FOCUS WM_DEBUG_FOCUS_LIGHT WM_DEBUG_IME WM_DEBUG_IMMERSIVE WM_DEBUG_KEEP_SCREEN_ON WM_DEBUG_LOCKTASK WM_DEBUG_ORIENTATION WM_DEBUG_RECENTS_ANIMATIONS WM_DEBUG_REMOTE_ANIMATIONS WM_DEBUG_RESIZE WM_DEBUG_SCREEN_ON WM_DEBUG_STARTING_WINDOW WM_DEBUG_STATES WM_DEBUG_SWITCH WM_DEBUG_SYNC_ENGINE WM_DEBUG_TASKS WM_DEBUG_WINDOW_MOVEMENT WM_DEBUG_WINDOW_ORGANIZER WM_DEBUG_WINDOW_TRANSITIONS WM_ERROR WM_SHOW_SURFACE_ALLOC WM_SHOW_TRANSACTIONS
  Logcat: WM_DEBUG_FOCUS_LIGHT WM_DEBUG_WINDOW_TRANSITIONS WM_ERROR
Logging definitions loaded: 604


例如:
$ logcat | grep findFocusedWindow // 抓取findFocusedWindow相关的logDisplayContent.java中,有如下代码:
  ProtoLog.v(WM_DEBUG_FOCUS_LIGHT, "findFocusedWindow: Found new focus @ %s", w);
正常情况下,logcat中不会输出上面的log。
但通过如下命令打开调试log后,在logcat中就会输出上面的log:
$ cmd window logging enable-text WM_DEBUG_FOCUS_LIGHT
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值