Android 中 Activity的生命周期 和 Log输出
2016-07-09 16:30
525 查看
Log输出
Android系统在用户空间中提供了轻量级的logger日志系统,它是在内核中实现的一种设备驱动,与用户空间的logcat工具配合使用能够方便地跟踪调试程序。
Log.v(tag,message); //verbose模式,打印最详细的日志
Log.d(tag,message); //debug级别的日志
Log.i(tag,message); //info级别的日志
Log.w(tag,message); //warn级别的日志
Log.e(tag,message); //error级别的日志
其中tag和message分别是两个String值.从android开发帮助文档中来看,tag和message的定义分别是:
tag
Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
msg
The message you would like logged.
可看出tag用来标记log消息的源头的.而message则是这条log的内容.
从日志的输出数量来算,error,warn,info,debug,verbose,数量从少到多.
Android系统在用户空间中提供了轻量级的logger日志系统,它是在内核中实现的一种设备驱动,与用户空间的logcat工具配合使用能够方便地跟踪调试程序。
Log.v(tag,message); //verbose模式,打印最详细的日志
Log.d(tag,message); //debug级别的日志
Log.i(tag,message); //info级别的日志
Log.w(tag,message); //warn级别的日志
Log.e(tag,message); //error级别的日志
其中tag和message分别是两个String值.从android开发帮助文档中来看,tag和message的定义分别是:
tag
Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
msg
The message you would like logged.
可看出tag用来标记log消息的源头的.而message则是这条log的内容.
从日志的输出数量来算,error,warn,info,debug,verbose,数量从少到多.
相关文章推荐
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- android 代码实现控件之间的间距
- android FragmentPagerAdapter的“标准”配置
- Android"解决"onTouch和onClick的冲突问题
- android:installLocation简析
- android searchView的关闭事件
- SourceProvider.getJniDirectories