Android的日志记录 [英] Android Logging

查看:163
本文介绍了Android的日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要登录的异常在我的Andr​​oid应用程序。有没有办法记录异常的话,我可以概略地阅读本日志,并将其发送到服务器或somethig这样呢?

I need to log exceptions in my android application. Is there way to log exception so, that i can diagrammatically read this logs and send it to server or somethig like that?

推荐答案

我可以在这里看到一些不同的情况:

I can see a few different situations here:

答:如果你在谈论的发展过程中,异常可以通过点击错误过滤器来查看在LogCat中(例如,在Debug透视图)

A: If you're talking about the development process, exceptions can be viewed in LogCat (for example, in the Debug perspective) by clicking on the Error filter.

B:如果你在谈论的崩溃在生产中的应用程序,堆栈跟踪报道,谷歌和可以在Android Market开发者可以查看控制台

B: If you're talking about crashes in production apps, stack traces are reported to Google and can be viewed in the Android Market Developer Console.

C:否则,如果要记录并提交您捕捉(因此不允许崩溃的活动)的异常,然后检查日志类<一href="http://stackoverflow.com/questions/601503/how-do-i-obtain-crash-data-from-my-android-application">How从我的Andr​​oid应用程序获取崩溃数据?

C: Otherwise, if you want to log and submit an exception that you are catching (and therefore not allowing to crash the activity), then check out the logging class in How do I obtain crash-data from my Android application?

这篇关于Android的日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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