Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logcat viewer in Eclipse flickers annoyingly

In the logcat viewer in Eclipse, if it is set to filter messages coming from the application I am currently debugging, the list flickers annoyingly. My guess that it reloads the list every time a log message arrives from my device, even if it is not displayed because of the filter. However, it makes reading log messages very hard.

Is there any way to counter this bug? Or is there an alternate logcat viewer for Android?

like image 662
petersohn Avatar asked Sep 23 '12 15:09

petersohn


2 Answers

When it flickers on mine, I use the Scroll Lock option on the Logcat window. You can find it on the right top with other buttons such as Save log etc.

like image 181
hshed Avatar answered Sep 24 '22 22:09

hshed


Depending on which OS you are running there are a couple of alternatives.

If you want to do this in Eclipse natively, I'm not sure what you want to do, but here are some ways of doing it outside of eclipse.

For all OS' you can use the built-in filtering of adb, but you can only filter out processes, say your apps process or a system process (From a system terminal like cmd, xterm, etc.)

adb logcat PackageManager:V com.myapp.package:V *:S

The *:S means "silence all other packages" and :V means Verbose logs and up.

For Linux, MacOS etc (any *IX-based OS), and Windows with GnuWin32 installed you can use

adb logcat | grep "Some search term"

If you want to use several search terms you could use regexp

adb logcat | grep -E "SearchTerm1|SearchTerm2"

If you want to pipe the output to a file (on *IX systems) but still want to read the output, you can use

adb logcat | grep "Some term" | tee myfile.txt

Which will print and log to file at the same time.

like image 44
Erik Zivkovic Avatar answered Sep 25 '22 22:09

Erik Zivkovic