1.使用System.out.println语句

a 直接在代码中插入:System.out.println("johnny: test");

b 打开Window--Show View--Other--Android--LogCat

c Filter : johnny 得到:

由此可见,在输入println消息的时候要有独特的特征,这样才能够在众多的消息中通过filter找到它。

注意,filter所过滤的是text栏的内容,对其他栏没有任何的过滤作用。

 

2. 使用Log类

a import android.util.Log;

b Log.d("TAG", "johnny: test");

c 打开Window--Show View--Other--Android--LogCat

d Filter : johnny 得到:

 

 

 posted on 2013-03-10 14:21  Jiang, X.  阅读(333)  评论(0编辑  收藏  举报