我可以在手机重启后得到logcat的日志? [英] Can I get logcat logs after phone reboots?

查看:1721
本文介绍了我可以在手机重启后得到logcat的日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我测试Android应用程序与长时间运行的服务。我使用Eclipse和有USB线迷上了用手机坐在我旁边。因为它是一个长期持续的服务,我做一些其他工作,同时运行并检查的logcat日志,每过一段时间,以确保一切正在按计划进行。

I'm testing an android application with a long running service. I'm using Eclipse and have the usb cord hooked up with the phone sitting next to me. Since it's a long ongoing service, I do some other work while it runs and check the logcat logs every once in a while to make sure everything is going as expected.

几分钟前,我注意到了手机重启。我认为这是因为它可以解释一些怪异的应用程序的行为这样做过。我很快切换到Eclipse,看看发生了什么,发现logcat的日志是(似乎)的重新启动过程中被清除。因此,有没有日志我的应用程序是否崩溃(并记下了电话?),或者如果有那记下了电话,我的应用程序。一些其他的问题。

A few minutes ago I noticed the phone rebooting. I think it's done this before as it would explain some weird application behavior. I quickly switched over to Eclipse to see what happened and found that the logcat log was (it seems) cleared during the reboot. So there's no log of whether my app crashed (and took down the phone?!) or if there was some other problem that took down the phone and my app.

反正我有可以找到发生了什么事?这是一个开发的手机,所以我不知道这是否重启/死机往往对自己的,或者仅在我的应用程序正在运行。这是摩托罗拉Droid上运行的固件版本2.1 UPDATE1。

Is there anyway I can find out what happened? This is a development phone, so I don't know if it reboots/crashes often on its own, or only while my app is running. It's a Motorola Droid running Firmware version 2.1-update1.

感谢您的帮助。

推荐答案

我不知道有没有办法做到这一点。但是,你可以启动logcat中的亚洲开发银行亚行logcat -v时间> logcat.txt ,然后再次运行你的应用程序。如果它崩溃了第二次,那么你可以去看看你的机器上 logcat.txt 的输出。

I don't know of any way to do this. However, you could start up logcat in adb with adb logcat -v time > logcat.txt and then run your app again. If it crashes a second time, then you can go look at the output in logcat.txt on your machine.

这篇关于我可以在手机重启后得到logcat的日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆