Last active
February 4, 2018 17:13
-
-
Save mohsenoid/cb7156e8a32cb18341468d37e68d9e4c to your computer and use it in GitHub Desktop.
Sample ApplicatioImpl class https://hackernoon.com/yet-another-mvp-article-part-2-how-dagger-helps-with-the-project-90d049a45e00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mirhoseini.marvel; | |
import timber.log.Timber; | |
public class MarvelApplicationImpl extends MarvelApplication { | |
@Override | |
public void initApplication() { | |
// initialize Timber in debug version to log | |
Timber.plant(new Timber.DebugTree() { | |
@Override | |
protected String createStackElementTag(StackTraceElement element) { | |
// adding line number to logs | |
return super.createStackElementTag(element) + ":" + element.getLineNumber(); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment