Skip to content

Instantly share code, notes, and snippets.

@AliMehrpour
Last active January 10, 2020 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliMehrpour/f3b626398a14502dbfabc117e7f12c8c to your computer and use it in GitHub Desktop.
Save AliMehrpour/f3b626398a14502dbfabc117e7f12c8c to your computer and use it in GitHub Desktop.
object TimberLog {
fun init() {
Timber.plant(ReleaseTree())
}
class ReleaseTree: Timber.Tree() {
override fun log(priority: Int, tag: String?, message: String, throwable: Throwable?) {
if (priority >= Log.WARN) {
FlurryAgent.onError(tag ?: "", message, throwable ?: Throwable(message))
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment