android常用日志log输出

log代码如下:

private String token;
token = mySharedPreferences.getString("usertoken", "");
Log.v("token为v----", token);// 输出verbose级别的日志,所有内容都会输出,包含(v+d+i+w+e)
Log.d("token为d----", token);// 输出debug级别的日志,输出调试的信息,包含(d+i+w+e)
Log.i("token为i----", token);/// 输出info级别的日志,输出一般的信息,包含(i+w+e)
Log.w("token为w----", token);// 输出warning级别的日志,输出警告的信息,包含(w+e)
Log.e("token为e----", token);// 输出error级别的日志,输出错误的信息,包含(e)

以如上log为例,控制台通过选中该下拉框来查询信息:
image.png

  • 控制台选择Verbose,可以查询到v+d+i+w+e等级的信息
    image.png
  • 控制台选择Verbose,可以查询到d+i+w+e等级的信息
    image.png
  • Log.i("token为i----", token);
    image.png
  • Log.w("token为w----", token);
    image.png
  • Log.e("token为e----", token);(没有错误)
    image.png

你可能感兴趣的:(android常用日志log输出)