티스토리 뷰

Ouput log/message in android


You could use Log class for debugging in android.


1. Define a variable for TAG

static final String TAG = "TestActivity";

 

2. Call one of below methods

Log.d: Debugging

Log.e: Error

Log.i: Information
Log.v: Vorbose
Log.w: Wrarning


3. input codes to ouput

 

protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i(TAG, "onCreate()"); }

 

4. Check messages in Logcat



댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함