how do I write to console from android using eclipse
android, eclipse
Solution
Use the the Log class.
For your purposes I'd suggest you use the following:
Log.d("className", "message");
`className` lets you distinguish from which class the message is coming. `message` is the message you want to output into the console.
Your log will appear in the LogCat view, which is located under: Window > show view > other > Android > LogCat
You can also set filters to only see certain logs that you make. You can also log according to priority, eg errors or warnings.
For more info look at this: http://www.vogella.com/articles/AndroidLogging/
Problem
I am sure this question has been asked before but I cannot find it. I am trying to print some simple statements during the runtime of my application. When writing a normal java application I just do ``` System.out.println("message"); ``` and for iOS I do ``` NSLog(@"message"); ``` I have looked around but can't find a simple solution for android? Is it possible that I have a setting misplaced in eclipse? What is the standard code used for this and where would it usually appear within eclipse