如何清空(清除)Android中的logcat缓冲区 [英] How to empty (clear) the logcat buffer in Android

查看:3496
本文介绍了如何清空(清除)Android中的logcat缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何清空(清除)Android中的logcat缓冲区?

How can I empty (clear) the logcat buffer in Android?

我使用命令行中的adb logcat并将输出通过管道传输到文件,因为DDMS的缓冲区非常有限.目前,当我重新启动我的应用程序(修复错误等之后)时,logcat缓冲区也包含上次启动时的数据.即使卸载该应用程序也不会清除缓冲区.到目前为止,我发现清除缓冲区的唯一方法是重新启动.这是有效的,但想知道是否有更简单的方法.

I use adb logcat from command line and pipe the output to a file, since the DDMS has a very limited buffer. At the moment, when I restart my app (after fixing bugs etc) the logcat buffer has data from the previous launch as well. Even uninstalling the app does not clear the buffer. The only way I've found so far to clear the buffer, is reboot. This is effective, but would like to know if there's an easier way.

推荐答案

adb logcat -c

此处记录了Logcat选项: http://developer.android.com/tools/help/logcat.html

Logcat options are documented here: http://developer.android.com/tools/help/logcat.html

这篇关于如何清空(清除)Android中的logcat缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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