A tiny log library for android
- we will use Android Log API as "Log.d(TAG, content)" finally, and actually we should think how to generate tag and content better.
- Android Log API is a static method, and be invoked frequently. so we should not new objects frequently to invoke like that.
- easy to use, and more configurations to choose.
- switch to log to console or not;
- switch to log to file or not;
- click the log to jump to the code position automatically;
- log to file by customized size;
- output content can be encrypted;
- Desing Pattern
- Singleton Pattern
- Skill Point
- ExecutorService
- synchronized
- new Throwable()
-
initialize TinyLog.config().setEnable(BuildConfig.DEBUG).setWritable(true).setLogPath(getLogDir()).setFileSize(1).setEncrypt("1234567812345678").setLogCallBack(mLogCallBack).apply(); You can init TinyLog like that, and you can choose enable, writable, logpath, filesize, encrypt and callback or not; if you don't set, they also have default value.
-
api
- TinyLog.v/d/i/w/e("content");
- TinyLog.v/d/i/w/e("tag", "content");
- TinyLog.v/d/i/w/e("tag", "content", "arg1");
- TinyLog.e("content", e, "arg1")
- TinyLog.e("tag", "content", e, "arg1")
- save as Json format;
- save as Xml format;
- save log to customized file;
- multi process support;