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
  • 43,672
  • 25
  • 98
  • 142
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

plainsMfkr
  • 33
  • 1
  • 6
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,459
  • 1
  • 19
  • 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
  • 23,055
  • 10
  • 129
  • 146
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,142
  • 10
  • 17