1

I used to write something like System.out.println(...); for tracing the information in Java.

But it doesn't write any messages to my IDE console, when I use it for programming for Android. What is the proper way to write to standard output stream?

Martin Buberl
  • 45,844
  • 25
  • 100
  • 144
Ant
  • 23
  • 3
  • Duplicate of http://stackoverflow.com/questions/2220547/why-doesnt-system-out-println-work-in-android – Karthik Dec 20 '11 at 18:48

5 Answers5

3

I've always used the log functions though there might be a better way.

http://developer.android.com/reference/android/util/Log.html

1

System.out.println() messages will come in the Logcat window in Eclipse, it wont come in Console window.
For Android it is better to use Log functions.

Karthik
  • 3,509
  • 1
  • 20
  • 26
0

with the LOG function. see here:

http://developer.android.com/reference/android/util/Log.html

0

See also http://developer.android.com/guide/developing/tools/logcat.html on how to gather logs.

Vadzim
  • 24,954
  • 11
  • 143
  • 151
0

You must the android.util.Log class. This class ptint the logs in the LogCat view of Eclipse.

Log.v("SOMETAG", "Message for the log");

jegumi
  • 1,162
  • 10
  • 17