How can I print messages (like a flag) to the Eclipse console (or log) when developing and debugging an Android app
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Rather than trying to output to the console,
Logwill output to LogCat which you can find in Eclipse by going to: Window->Show View->Other…->Android->LogCatHave a look at the reference for
Log.The benefits of using LogCat are that you can print different colours depending on your log type, e.g.:
Log.dprints blue,Log.eprints 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.