Skip to content

Instantly share code, notes, and snippets.

@danielgomezrico
Last active Jun 21, 2016
Embed
What would you like to do?
Android / Log / Timber - print line number on timber logs. source=https://caster.io/episodes/episode-14-logging-with-timber/
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
Timber.plant(new Timber.DebugTree() {
@Override
protected String createStackElementTag(StackTraceElement element) {
return super.createStackElementTag(element) + ":" + element.getLineNumber();
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment