如何从电话关闭系统日志

时间:2019-01-17 14:55:16

标签: android

我正在学习android应用开发,在这里我发现了很多类似下面的日志。

我确定日志不是来自我的应用,而是来自wifi驱动程序?

如何关闭它?

01-17 22:45:43.007 8755-8952/? E/WifiConfigStore: has d0:c7:c0:11:09:e6 freq=2412 age=1640 ?=true
01-17 22:45:43.007 8755-8952/? E/WifiStateMachine: WifiStateMachine starting scan for "wifi"WPA_PSK with 2412
01-17 22:45:43.007 8755-8952/? E/WifiStateMachine: stopReconnectWifi Wfd=false StopScan=false mDontReconnectAndScan=false
01-17 22:45:43.008 8755-8952/? E/WifiStateMachine: [1,547,736,343,007 ms] noteScanstart no scan source uid -2
01-17 22:45:43.008 8755-18691/? E/WifiMonitor: handleEvent unknown: 15  CTRL-EVENT-SCAN-STARTED 
01-17 22:45:43.594 8755-8755/? E/WifiTrafficPoller: TRAFFIC_STATS_POLL true Token 1373 num clients 19
01-17 22:45:43.595 8755-8755/? E/WifiTrafficPoller:  packet count Tx=84893 Rx=71940
01-17 22:45:44.295 8755-8952/? E/WifiStateMachine:  ConnectedState (when=0 what=147461!SCAN_RESULTS_EVENT 0 0 found=17 known=1 got=17 bcn=0 con=1
01-17 22:45:44.295 8755-8952/? E/WifiStateMachine:  L2ConnectedState (when=-1ms what=147461!SCAN_RESULTS_EVENT 0 0 found=17 known=1 got=17 bcn=0 con=1
01-17 22:45:44.296 8755-8952/? E/WifiStateMachine:  ConnectModeState (when=-1ms what=147461!SCAN_RESULTS_EVENT 0 0 found=17 known=1 got=17 bcn=0 con=1
01-17 22:45:44.296 8755-8952/? E/WifiStateMachine:  DriverStartedState (when=-1ms what=147461!SCAN_RESULTS_EVENT 0 0 found=17 known=1 got=17 bcn=0 con=1
01-17 22:45:44.296 8755-8952/? E/WifiStateMachine:  SupplicantStartedState (when=-2ms what=147461!SCAN_RESULTS_EVENT 0 0 found=17 known=1 got=17 bcn=0 con=1
01-17 22:45:44.297 8755-8952/? E/WifiStateMachine: [1,547,736,344,297 ms] noteScanEnd no scan source onTime=0
01-17 22:45:44.304 8755-8952/? E/WifiStateMachine: wifi setScanResults statecom.android.server.wifi.WifiStateMachine$ConnectedState@fefd9d4 sup_state=COMPLETED debouncing=false mConnectionRequests=1 selection=<none>
01-17 22:45:44.305 8755-8952/? E/WifiConfigStore: updateSavedNetworkHistory(): try "wifi"WPA_PSK SSID="wifi" wifi [WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS] ajst=0
01-17 22:45:44.305 8755-8952/? E/WifiConfigStore:         got known scan result d0:c7:c0:11:09:e6 key : "wifi"WPA_PSK num: 1 rssi=-53 freq=2412
01-17 22:45:44.307 8755-8952/? E/WifiAutoJoinController: status: bssid=d0:c7:c0:11:09:e6

2 个答案:

答案 0 :(得分:3)

如果您使用的是Android Studio,请在 Logcat窗口中选择“ 仅显示选定的应用程序”,以仅查看应用程序日志。 enter image description here

答案 1 :(得分:1)

这些日志来自用于Wi-Fi的android系统组件,该组件使用这些类并打印其必要的日志。

如果您不想看到它,只需转到下面的 Logcat 窗口,然后在角,从下拉列表中选择仅显示选定的应用程序菜单。

作为一名新的android开发人员,我认为您需要进一步了解android Log 类。这是官方的documentation