Android专用的LogCat工具:KLog
jopen
9年前
这是一个Android专用的LogCat工具,主要功能为打印行号、函数调用、Json解析、点击跳转等。灵感来自Logger 。
</div> KLog的特点
- 支持显示行号
- 支持显示Log所在函数名称
- 支持无Tag打印
- 支持点击函数名称,跳转至执行文件位置
- 支持JSON字符串解析打印
- 依赖库非常小,核心代码200行,只有4K
使用详解
下面以KLog.d()为例,下面的用法同样适用于
- KLog.v()
- KLog.d()
- KLog.i()
- KLog.w()
- KLog.e()
- KLog.a()
Sample Usage
KLog.d()
Use this method , you can get a log like follwing,default tag is current class name
KLog.d(String)
you can print a String with this method ,default tag is current class name
KLog.d(Tag,String)
you can set tag by youself , the result is as bollow
KLog.json(String)
you can print a String with json format ,and it will be formated as following
KLog.json(Tag,String)
as same as above , but with a tag whitch are set by yourself
JCenter
dependencies { compile 'com.github.zhaokaiqiang.klog:library:0.0.1' }