简体   繁体   English

用logcat检查过去的日志?

[英]Examine logs from the past with logcat?

I'd like to examine stack traces from the last hours. 我想检查过去几小时的堆栈跟踪。 I haven't found a proper logcat command. 我还没有找到合适的logcat命令。 Does Android "forget" those logs? Android会“忘记”那些日志吗?

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. 当我在我的同事Iphone App中发现未处理的异常时,他将iphone连接到他的计算机并将堆栈跟踪读入x-code。 X-Code also visualizes the exception in a nice way. X-Code还以一种很好的方式可视化异常。 Is there a smth. 有没有smth。 similar in Android? 在Android中类似?

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 我想看看在家里分析它的logcat输出是什么
  • I just launch the Android log collector app , and send myself an email with the logcat output 我刚刚启动Android日志收集器应用程序 ,并向自己发送一封带有logcat输出的电子邮件
  • I get home, have dinner, feed the dogs and then I can start working on the logtrace I emailed hours ago. 我回家,吃晚饭,喂狗,然后我就可以开始研究我几小时前通过电子邮件发送的日志了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM