1

How can I get a wider LogCat output than the one from the terminal window? I also want to be able to pause the output so I can actually read something.

My OS is Windows 7 X64.

0

3 Answers 3

6

Windows

Its easier, what you can do is this, from the cmd window, adb logcat > my_logcat.txt and just let it run, now, you can pause, resume the scrolling, in that cmd window, same keystrokes for Linux terminal, IIRC, now launch an editor and open the file 'my_logcat.txt' and there the results will show, had there not being a pause/resume in the cmd window, the file will get updated, such as using 'notepad2', 'Notepad++' or similar, the in-built Windows's version of Notepad would do very little justice.

Linux

From a Linux terminal under a GUI such as KDE/Gnome, using the two utilities combined, found on most distributions, multitail, which is like a tail unix utility, only more powerful!

adb logcat # want to see the logcat on the screen

Using Ctrl+S to suspend, then Ctrl+Q to resume the display, and simply mouse scroll the terminal to back-track seeing the logcat output.

The other way is this...

adb logcat > my_logcat.txt 2>&1 & 
multitail my_logcat.txt

The first line above creates a background process by using the & at the end of the command, redirecting any errors to /dev/null hence 2>&1.

As the process is forked into the background, using multitail can perform, scroll-back on the logcat.

1
  • I forgot the > in the instruction below lol. Thank you for the detailed solution for both linux and windows ;) +1
    – Forza
    Commented Aug 28, 2012 at 16:22
4

If you are using LogCat viewer in Eclipse you can click the "Scroll Lock" button to prevent it from automatically scrolling down.

Eclipse LogCat viewer

It is the icon on the top right in the screenshot above.

0

I don't know what logcat does so I can only guess you should use it the same way you do with any other command that spews out text.

Redirect the output to a file you can read in an editor or view with less

$>logcat [<option>] [<filter-spec>] > /path/to/a/file-to-open-in-an-editor
1
  • Well, I can't get this working. For some reason everything on my C drive, including the desktop, is read-only for the terminal window... see: piclair.com/data/2to2f.jpg Isn't there a simple application that monitors logcat output and has the ability to pauze the output? That would make things a lot easier
    – Forza
    Commented Aug 27, 2012 at 9:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .