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

LogUtils日志管理工具

时间:2017-02-22 22:55:13      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:erro   string   oid   span   info   nbsp   eve   error   工具   

public class LogUtils {
    public static final int VERBOSE = 1;
    public static final int DEBUG = 2;
    public static final int INFO = 3;
    public static final int WARN = 4;
    public static final int ERROR = 5;
    public static final int NOTHING = 6;
    public static final int level = VERBOSE;
        
        public static void v(String tag,String msg){
            if(level <= VERBOSE){
                Log.v(tag,msg);
            }
        }
       public static void v(String tag,String msg){
            if(level <= DEBUG){
                Log.d(tag,msg);
            }
        }
        public static void v(String tag,String msg){
            if(level <= INFO){
                Log.i(tag,msg);
            }
        }
        public static void v(String tag,String msg){
            if(level <= WARN){
                Log.w(tag,msg);
            }
        }
         public static void v(String tag,String msg){
            if(level <= ERROR){
                Log.e(tag,msg);
            }
        }

 

LogUtils日志管理工具

标签:erro   string   oid   span   info   nbsp   eve   error   工具   

原文地址:http://www.cnblogs.com/yl-saber/p/6431229.html

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