eclipse eclipse中的Logcat保持自动清除

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5794796/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 16:13:38  来源:igfitidea点击:

Logcat in eclipse keeps auto clearing

androideclipselogcat

提问by tyczj

until recently my logcat has been fine but all of the sudden whenever i try to view it in eclipse it just keeps clearing itself whenever anything is displayed making it impossible to read. viewing it in the adb works but I never bother with that since it is just such a pain to read and find anything you are looking for.

直到最近,我的 logcat 一直很好,但是突然间,每当我尝试在 eclipse 中查看它时,它都会在显示任何内容时不断清除自己,从而无法阅读。在 adb 工作中查看它,但我从不为此烦恼,因为阅读和找到您正在寻找的任何东西都非常痛苦。

is there a way to fix this problem?

有没有办法解决这个问题?

采纳答案by Amplify91

It will show one line before erasing it to show the next one? Just click the verbose button again.

它会在擦除之前显示一行以显示下一行?只需再次单击详细按钮即可。

回答by Shadoath

The Logcat messages were simple getting cleared because the buffer had run out of space (receiving too many new messages), which is a simple setting change in Eclipse.

Logcat 消息很容易被清除,因为缓冲区空间不足(接收到太多新消息),这是 Eclipse 中的一个简单设置更改。

To fix, go to Window > Preferences > Android > LogCat

要修复,请转到 Window > Preferences > Android > LogCat

and increase the limit for "Maximum number of LogCat messages to buffer". Set it to 0 for unlimited size, or a really big number. But keep in mind, anything below 10000 fills up real fast.

并增加“要缓冲的 LogCat 消息的最大数量”的限制。将其设置为 0 表示无限大小,或者一个非常大的数字。但请记住,低于 10000 的任何内容都会很快填满。

Been answered already: Eclipse Android - Logcat Clearing too Fast

已经回答: Eclipse Android - Logcat Clearing too Fast

回答by Michael

There's a workaround for this bug. Click active mode button (usually verbose), choose another device from device list and choose previous device again. It will restore all logcat messages.

这个错误有一个解决方法。单击活动模式按钮(通常是详细的),从设备列表中选择另一个设备,然后再次选择上一个设备。它将恢复所有 logcat 消息。

回答by Pixel

LogCat is really annoying for this. In Ubuntu, I found the following works really well:

LogCat 真的很烦人。在 Ubuntu 中,我发现以下方法非常有效:

Open a terminal and type adb logcat | grep MYINFO

打开终端并输入 adb logcat | grep MYINFO

This will only show adb messages filtered by the MYINFOstring.

这将只显示按MYINFO字符串过滤的 adb 消息。

So, you can code something like:

因此,您可以编写如下代码:

Log.v("MYINFO", "x" + x_value + ", etc...");

This is such a relief to use. A life saver! See thisfor more info.

这使用起来真是一种解脱。一个救命稻草!请参阅了解更多信息。

You may find sometimes the logcat buffer repeats previous logs on starting again. To overcome this, type

您可能会发现有时 logcat 缓冲区会在重新启动时重复以前的日志。为了克服这个问题,输入

adb logcat -c