Reputation: 273
How can I trace the output from eclipse and the android simulator. I am used to doing it in Flash and actionscript.
In AS3 it would be: trace('my trace statement');
Upvotes: 1
Views: 1263
Reputation: 1437
You have a few options. One is the java.util.logging.ConsoleHandler class: http://developer.android.com/reference/java/util/logging/ConsoleHandler.html
ConsoleHandler console = new ConsoleHandler();
console.publish(new LogRecord(Level.INFO, "Hello logging!"));
Another option is using the Log class: http://developer.android.com/reference/android/util/Log.html
Log.v("MyIdentifier", "Hello logging!");
Upvotes: 2