关于Android日志处理
This is a useful log tool for Android
Android LogCat 工具类,目前功能:
- 无参数打印
- 打印所在行号
- 打印所在函数
- AS点击方法名自动跳转
- Json格式自动解析打印
- xml格式自定解析打印
- Log信息存储到文件(6.0以上需要动态申请存储空间权限)
- 变长参数打印
- 无logcat最多4000字符打印限制
- Can use ToolLog.d() with no tag
- Print log info with line number and method name
- Jump to the position where the log is invoked, by click in the Android Studio Logcat
- Add ToolLog.log() could save the log to log
- Add ToolLog.getLocalLogFile() could get the local log
- Add ToolLog.getLocalLogBackupFile() could get the local log backups
- Add support check is has permissions[android.permission.WRITE_EXTERNAL_STORAGE]
- Add the thread pool handle file reading and writing
- Add Throwable object log processing
ToolLog.f(TAG, Environment.getExternalStorageDirectory(), "test.txt", JSON_LONG);ToolLog.x(XML);compile 'com.darren.library:loglib:1.7.1'You need add ToolLog.jar into your project.
If you don't need the method -- ToolLog.x() ,you can delete the method about it ,so that you can decrease the almost size of this library.