Skip to content

Instantly share code, notes, and snippets.

@TheLittleNaruto
Created May 13, 2020 17:19
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 TheLittleNaruto/1d86664d1b0db376779a0868be9db16b to your computer and use it in GitHub Desktop.
Save TheLittleNaruto/1d86664d1b0db376779a0868be9db16b to your computer and use it in GitHub Desktop.
Example on Logging for Medium article blog on Logging and debugging
class MainActivity : AppCompatActivity() {
companion object {
val TAG = MainActivity::class.java.simpleName
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "$TAG=> onCreate()")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment