blankj / alog Goto Github PK
View Code? Open in Web Editor NEW:pencil: A simple util of log in Android develop.
License: Apache License 2.0
:pencil: A simple util of log in Android develop.
License: Apache License 2.0
如
自定义名字+error.log
自定义名字+debug.log
日期+级别.log
当ALog.json()在部分手机上无法显示 , 好像是因为某些手机不支持debug类型信息的打印, 但是Alog.json方法所用的类型又是debug类型 , 所以有些手机无法打印
每条log需要的stackOffset往往不一样,应该每种log多一个带stackOffset参数的
Log头部含有当前类及行号和函数名
但是不支持点当前类及行号和函数名的点击跳转
即logcat打印出来的函数名或者类名并无点击特性
我的使用环境线程切换比较频繁
首先真的要佩服一下,一个类就搞定了这么多功能。readme中有提到兼容as,想问下是怎么做到的呢?
java.lang.NullPointerException: Attempt to get length of null array
at ALog.print2Console(ALog.java:361)
主要是些自己的感觉,或者说习惯,也许作者有自己的想法,
不支持给指定tag设置log级别?
这个可以有,虽然是也可以在logcat设置过滤,但这不方便,
可以来个资源文件,管理标签对应的log级别,
或者干脆在最后调用Log类输出日志那里判断一下安卓的Log.isLoggelable(tag,level),
还有表示日志级别的6个常量,首先完全没必要为了一个方法去定义一个注解,
而且其实可以直接用Log里的常量,或者来个方法转换一下,这样最后输出日志可以用一个
Log.println(int priority, String tag, String msg)代替那一大段switch,
Log.v(tag, msg);
Log.d(tag, msg);
Log.i(tag, msg);
Log.w(tag, msg);
Log.e(tag, msg);
Log.wtf(tag, msg);
217行的这个,
if (V == sLogFilter || type >= sLogFilter) {
前一个条件是多余的吧,
结合timber的时候 怎么定位到原始log的位置 设置deep(2)无效
有的对日志需要加密的 可以加密写入到本地
我想放到个人工具库里,直接依赖这个库,然后用子类来扩展。不然还要复制一遍
10-18 11:00:00.748 29539-29539/? I/art: Late-enabling -Xcheck:jni
10-18 11:00:00.896 29539-29539/com.blankj.alog W/System: ClassLoader referenced unknown path: /data/app/com.blankj.alog-1/lib/arm
报了这个错,但是写文件是可以,难道是我的开发工具有问题.....我换成模拟器日志可以正常打印....
不支持下AndroidX吗,目前SimpleArrayMap调用的v4包
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.