Created
April 11, 2021 19:59
-
-
Save SurajBahadur/4012e4648a08fd75699f6ee8ef80221a to your computer and use it in GitHub Desktop.
Best Way To Get Class TAG In Kotlin For Debugging
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
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