码迷,mamicode.com
首页 > 其他好文 > 详细

查看与输出日志信息

时间:2017-07-23 18:23:33      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:优先级   color   输出   throw   deb   gtest   bsp   code   roi   

查看与输出日志信息:

1.优先级级别从高到低: Error > Warning > Info > Debug > Verbose

2.日志输出的3种方式:

(1)       Log.i

(2)       System.out.println

(3)       System.err.println

 3.实践:

 1 package com.example.test;
 2 
 3 import android.test.AndroidTestCase;
 4 import android.util.Log;
 5 
 6 public class LogTest extends AndroidTestCase{
 7 
 8     private static final String TAG = "LogTest";
 9     
10     public void testOutLog() throws Throwable{
11         Log.i(TAG, "www.itcast.cn");
12     }
13     
14     public void testOutLog2() throws Throwable{
15         System.out.println("www.itcast.cn");
16     }
17     
18     public void testOutLog3() throws Throwable{
19         System.err.println("www.itcast.cn");
20     }
21 }

 

查看与输出日志信息

标签:优先级   color   输出   throw   deb   gtest   bsp   code   roi   

原文地址:http://www.cnblogs.com/ttzm/p/7225206.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!