Skip to content

Instantly share code, notes, and snippets.

@murano500k
Created November 10, 2016 12:34
Show Gist options
  • Save murano500k/04fdaa7639d55296a6f48e3c559a8e30 to your computer and use it in GitHub Desktop.
Save murano500k/04fdaa7639d55296a6f48e3c559a8e30 to your computer and use it in GitHub Desktop.
Timber config
public class App extends Application {
@Override
public void onTerminate() {
super.onTerminate();
}
@Override
public void onCreate() {
super.onCreate();
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree(){
@Override
protected String createStackElementTag(StackTraceElement element) {
return super.createStackElementTag(element)
+'.'+element.getMethodName()
+':'+element.getLineNumber();
}
});
}
}
}
//<application
//...
// android:name=".App"
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment