如何输出消息Eclipse控制台时,为Android开发 [英] How to output messages to the Eclipse console when developing for Android

查看:207
本文介绍了如何输出消息Eclipse控制台时,为Android开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何打印信息(如标志)到Eclipse控制台(或日志)开发和调试Android应用程序时,

How can I print messages (like a flag) to the Eclipse console (or log) when developing and debugging an Android app

推荐答案

而不是试图输出到控制台,登录将输出到LogCat中,你可以在Eclipse中找到通过将:窗口 - >显示视图>其他... - > Android-> LogCat中

Rather than trying to output to the console, Log will output to LogCat which you can find in Eclipse by going to: Window->Show View->Other…->Android->LogCat

有一个看参考登录

使用LogCat中的好处是,你可以打印不同的颜色取决于你的日志类型,如: Log.d 打印蓝,日志。 Ë打印橙色。您也可以通过筛选的日志标签 日志信息 进程id 和/或通过的应用程序名。当你只是想看看你的应用程序的日志,并保留其他系统不同的东西,这是非常有用的。

The benefits of using LogCat are that you can print different colours depending on your log type, e.g.: Log.d prints blue, Log.e prints orange. Also you can filter by log tag, log message, process id and/or by application name. This is really useful when you just want to see your app's logs and keep the other system stuff separate.

这篇关于如何输出消息Eclipse控制台时,为Android开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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