My problem is that I try to debug a running app with an exception that happens after long running. In the mean time, the DDMS log cat logs any output from the phone, which is about >1000 messages per second for some buffer output.

Thus, all error messages from my app are not only drowned, but erased from the log output window within moments, with no way to save it in time.

In here was mentioned a way to direct the output into a file, but using

adb logcat -s > ~/log2.txt

only outputs

--------- beginning of /dev/log/system
--------- beginning of /dev/log/main

And then nothing. The docs are not helpful at all.

Any hints?

有帮助吗?

解决方案

In the docs, you can find the description of the -s option:

Sets the default filter spec to silent.

So no log will be displayed. You should try to remove this -s.

其他提示

Actually, the docs, that you've mentioned seems to be helpful. In the table on the referenced page it is said:

The following table describes the command line options of logcat.

-f <filename> Writes log message output to . The default is stdout.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top