How can I erase the old data from logcat?

谁说我不能喝 提交于 2019-12-18 10:24:59

问题


When I execute the command

adb logcat

while running the android emulator, all of the old logs blow past and so I figure they are stored in a file somewhere. Is there a command I can run to clear the logs and start fresh? If not, is there some other way to do this?


回答1:


Have you tried this?

 adb logcat -c

https://developer.android.com/studio/command-line/logcat.html




回答2:


adb logcat -c 

didn't do it for me

adb logcat -b all -c

worked




回答3:


Dup of How to empty (clear) the logcat buffer in Android

The following command will clear only non-rooted buffers (main, system ..etc).

adb logcat -c

If you want to clear all the buffers (like radio, kernel..etc), Please use the following commands

adb logcat -b all -c

or

adb root
adb shell logcat -b all -c 


来源:https://stackoverflow.com/questions/2657348/how-can-i-erase-the-old-data-from-logcat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!