从概念上讲,Android Studio 中的 Logcat 是什么? [英] Conceptually, what is Logcat in Android Studio?

查看:40
本文介绍了从概念上讲,Android Studio 中的 Logcat 是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的代码中使用 Log.d(DEBUG, msg:"My message"); 进行调试.然后我正在运行 Logcat,这会导致显示我的消息".我想知道 Logcat 从概念的角度是什么意思和做什么.我知道这是相对模糊的,但希望在这里提供初学者可以理解的任何类型的解释或链接.谢谢

I am using Log.d(DEBUG, msg:"My message"); in my code for debugging purposes. Then I am running Logcat which results in "My message" being displayed. I am wondering what Logcat means and does from a conceptual standpoint. I understand this is relatively vague but would appreciate any sort of explanation or link here that can be understood by a beginner. Thanks

推荐答案

Logcat 本质上是打印出您指定或在某些 API 中指定的必要信息的日志.把它想象成 Java 中的 System.out.println() (实际上你可以这样做来打印日志.这也会显示在 Logcat 中).Logcat 在调试中非常有用,因为您可以记录数据值以查看是否正在设置或记录异常.

Logcat essentially prints out a log of necessary information specified by you or in certain APIs. Think of it like System.out.println() in Java (in fact you can actually do this to print out logs. This will show up in the Logcat as well). The Logcat is very useful in debugging since you can log data values to see if things are being set or you can log exceptions.

这篇关于从概念上讲,Android Studio 中的 Logcat 是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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