Skip to content

Instantly share code, notes, and snippets.

@SurajBahadur
Created April 11, 2021 19:59
Show Gist options
  • Save SurajBahadur/4012e4648a08fd75699f6ee8ef80221a to your computer and use it in GitHub Desktop.
Save SurajBahadur/4012e4648a08fd75699f6ee8ef80221a to your computer and use it in GitHub Desktop.
Best Way To Get Class TAG In Kotlin For Debugging
val Any.TAG: String
get() {
val tag = javaClass.simpleName
return if (tag.length <= 23) tag else tag.substring(0, 23)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment