tags:

views:

49

answers:

1

I've been told it's a command line option. But Eclipse's Run!Run Configurations...!Target!Additional Emulator Command Line Options field is already occupied with

-sdcard "C:\android-sdk-windows\tools\sd9m.img"

If I wanted to write something like

adb logcat -s MessageBox > "C:\Users\me\Documents\LogCatOutput.txt"

then where do I write it, and how (i.e., is the syntax even correct)? I need to output only a filtered tag, not verbose. ("MessageBox" is my TAG. Again I don't know if any of this punctuation is right, or even where the command goes.)

Thanks for any help.

+1  A: 

There should be an adb.exe file in C:\android-sdk-windows\tools. You can invoke this manually from a DOS command prompt:

cd C:\android-sdk-windows\tools
adb logcat -s MessageBox > "C:\Users\me\Documents\LogCatOutput.txt"

There's no need to bother with Eclipse in this case.

Trevor Johns
The file created in the directory is empty, blank. Both before and after I run my Android app. I don't know what to do.
What happens if you omit the last part (> "C:\Users\me\Documents\LogCatOutput.txt"). Do you see anything?
Trevor Johns
See anything where?
When you run `adb logcat -s MessageBox`, you should see log messages. If not, there's something wrong with your filter spec.See this page for documentation on writing the filter spec for use with logcat: http://developer.android.com/guide/developing/tools/adb.html#logcat
Trevor Johns
See log messages in my Windows command prompt window? I mean, I can already get filtered tag LogCat pane output fine in my DDMS window. I just can't redirect to a flat file.
Yes, that's correct. You should see log messages in your command prompt if you don't redirect to a file. If you don't see those, you're not entering the adb logcat command properly.Just trying to figure out where things are breaking down. :)
Trevor Johns
Trevor, I can't thank you enough for hanging in there with my idiocy. I run the Android app and watch the LogCat material scroll up. Then I run the Win console. Then I run the Droid app again, watch the same stuff scroll up in the LogCat tab. Run the console again. Nothing in the console, ever.
Except if I just eliminate the MessageBox tag and run the Win console as adb logcat. Then I get verbose output inside the Win console. I just can't materialize the filter tag MessageBox--which infuriatingly works inside the Dalvik, but not in the Win console.
Okay, so the problem is that '-s MessageBox' isn't a valid filter-spec. Try this: "adb logcat MessageBox:D *:S"
Trevor Johns
Trevor, thanks man! I've got something working here now thanks to your assistance. I'm discovering that I can run adb logcat MessageBox > "C:\Users\me\Documents\LogCatOutput.txt", i.e., without the -s flag (any flag), and I get verbose output into the flat file as the console is running. Luckily the MessageBox output is segregated contiguously inside the file output. So, great! Thanks again.
Okay, will try that suggestion in a minute after this thing finishes. I accidentally started something on a very large input. If I can't reply on that now I will later. Again, thanks for everything.
[Still waiting for it to finish. Went ahead and added props in the left margin.]