timberextended
extra useful log classes for timber
- ConstTagTree: with a const tag when set.
- ReleaseTree: log version for release mode.
- FileTree: log message inot a file.
- MultiTagTree: enable multi tag funcation.
ConstTagTree
Usage:
Timber.plant(new ConstTagTree().setTag("ConstTag"));
Timber.v("watch the tag"); //tag == "ConstTag"
Timber.v("watch the tag haha");//tag == "ConstTag"
Timber.v("watch the tag hehe");//tag == "ConstTag"
ReleaseTree
Usage:
Timber.plant(new ReleaseTree());
Timber.v("release log test: Timber.v"); //do not acutal log.
Timber.i("release log test: Timber.i"); //do not acutal log.
Timber.d("release log test: Timber.d"); //do not acutal log.
Timber.w("release log test: Timber.w"); //do log.
Timber.e("release log test: Timber.e"); //do log.
Timber.wtf("release log test: Timber.wtf"); //do log.
FileTree
Usage:
String path = Environment.getExternalStorageDirectory().getAbsolutePath();
Timber.plant(new FileTree().name("FileTree.txt").storeAt(path));
Timber.v("log in file"); //this will be store in file
MultiTagTree
Usage:
Timber.plant(new MultiTagTree().addTag("Whyn111")); //then the tag is like "Whyn111-MainActivity"
Timber.v("watch the tag");