16

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.

is there a way to fix this problem?

tyczj
  • 71,600
  • 54
  • 194
  • 296

4 Answers4

35

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.

To fix, go to 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.

Been answered already: Eclipse Android - Logcat Clearing too Fast

Community
  • 1
  • 1
Shadoath
  • 720
  • 1
  • 15
  • 31
  • awesome! thanks. my app is crashing randomly and I wanted to debug it. Logcat was clearing and I was not able to. But, now I can :) – Anand Rockzz Jan 25 '14 at 19:50
  • Worth to note that (at least in my case) LogCat needs to be restarted (closed and reopened) before this kicks into effect – avalancha Nov 19 '14 at 13:38
6

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

Amplify91
  • 2,690
  • 5
  • 24
  • 32
5

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.

Michael
  • 53,859
  • 22
  • 133
  • 139
0

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

Open a terminal and type adb logcat | grep MYINFO

This will only show adb messages filtered by the MYINFO string.

So, you can code something like:

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

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

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

adb logcat -c