LogUtils日志管理工具

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);
            }
        }

 

posted @ 2017-02-22 21:55  yl007  阅读(418)  评论(0编辑  收藏  举报