问题
I'd like to examine stack traces from the last hours. I haven't found a proper logcat command. Does Android "forget" those logs?
First story:
When I find an unhandled exception in my co-workers Iphone App, he connects the iphone to his computer and reads the stack trace into x-code. X-Code also visualizes the exception in a nice way. Is there a smth. similar in Android?
回答1:
You probably won't be able to see those logs from the past hours. Imagine that your phone stores all logs, how much space will it consume in a couple of days?
So, this is what I do:
- I'm in the autobus, and suddenly the app I'm working on crashes!
- I'd like to see what's the logcat output to analyze it at home
- I just launch the Android log collector app, and send myself an email with the logcat output
- I get home, have dinner, feed the dogs and then I can start working on the logtrace I emailed hours ago.
来源:https://stackoverflow.com/questions/4428643/examine-logs-from-the-past-with-logcat