Timber android logging library

by Faiz | 14 Dec 2018

Timber is a logging utility class built on top of Android’s classes.

Example:

Printed using default Log class.

int num = 2000;
Log.e(TAG, String.format("Integer a value is: %d", num));

String app_name = "Android Studio";
Log.e(TAG, String.format("My app name is: %s", app_name));


 

usage:

1. Create a project in Android Studio from File ⇒ New Project and select Basic Activity.

2. Open build.gradle and add Timber dependency. Butterknife is optional here, but required for this example.

 

// timber
implementation 'com.jakewharton.timber:timber:4.7.1'

// butter knife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'


 

GitHub

previous post