LogUtils工具栏
来源:互联网 发布:淘宝花呗还钱 编辑:程序博客网 时间:2024/05/21 20:30
public class LogUtils{private LogUtils(){/* cannot be instantiated */throw new UnsupportedOperationException("cannot be instantiated");}public static boolean isDebug = true;// 是否需要打印bug,可以在application的onCreate函数里面初始化private static final String TAG = "way";private mCurrentLevel = 1;private static final int VERBOSE = 1; public static final int DEBUG = 2; public static final int INFO = 3; public static final int ERROR = 4;// 下面四个是默认tag的函数public static void v(String msg){if (isDebug&&mCurrentLevel<=VERBOSE)Log.v(TAG, msg);}public static void d(String msg){if (isDebug&&mCurrentLevel<=DEBUG)Log.d(TAG, msg);}public static void i(String msg){if (isDebug&&mCurrentLevel<=INFO)Log.i(TAG, msg);}public static void e(String msg){if (isDebug$$mCurrentLevel<=ERROR)Log.e(TAG, msg);}// 下面是传入自定义tag的函数public static void i(String tag, String msg){if (isDebug)Log.i(tag, msg);}public static void d(String tag, String msg){if (isDebug)Log.i(tag, msg);}public static void e(String tag, String msg){if (isDebug)Log.i(tag, msg);}public static void v(String tag, String msg){if (isDebug)Log.i(tag, msg);}}
0 0
- LogUtils工具栏
- LogUtils
- LogUtils
- LogUtils
- LogUtils
- LogUtils
- LogUtils
- 工具栏
- 工具栏
- 工具栏
- 工具栏
- 工具栏
- 工具栏
- 工具栏
- 自定义LogUtils工具类
- xUtils系列之LogUtils
- LogUtils的介绍
- AndroidUtils——LogUtils
- JBPM4.4工作流引擎学习(二)--安装GPD
- mysql init-connect + binlog的方法进行mysql的审计
- android高级技术总结图(二)——android 图形系统综述
- android 播放视频时切换全屏隐藏状态栏
- NodeJs 关系数据库ORM库:Bookshelf.js
- LogUtils工具栏
- hjr学习-通信原理(一):通信基础
- oralce表空间创建修改删除
- C语言头文件#include<sys/types.h>的作用
- 02_下载
- android bluedroid bt 读写特性值的流程
- fdisk
- mac ox 搭建red5流媒体服务器(含Demo)--学习记录
- 我就是说点实话