How can I see long texts/msg in logcat?

Viewed 16165

Since we are using logcat as a console for android. There are cases when the the output text/msg is kinda big and I can't see the complete output. The log cat shows only the starting part of it. Is there a way to expand it so that I can see the full msg?

5 Answers

I never use the GUI to view logcat output, so I'm not sure where/whether there are scrollbars in the DDMS/Eclipse UI.

Anyway, you can use logcat from the command line — there are loads of options.

To watch the log of an active device continually: adb logcat
To dump the whole log: adb logcat -d
To dump the whole log to a file: adb logcat -d > log.txt
To filter and display a particular log tag: adb logcat -s MyLogTag

...and much more!

If you want to write long messages to see in logcat it may be worth writing your own wrapper around the android.util.Log methods which splits your long message over multiple lines.

Of course, you can change the column width, just by going to the end of the line clicking and dragging. That is a pain for really long messages. If I have a really long message, I generally copy the line and paste it into a text file. Ctrl-C in Windows will copy it.

Related