Skip to content

Instantly share code, notes, and snippets.

@e4basil
Forked from akshaykalola28/PrintToLogcat.kt
Created March 20, 2023 04:08
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 e4basil/48325d2fb2ac1e8ccde287a086f5748a to your computer and use it in GitHub Desktop.
Save e4basil/48325d2fb2ac1e8ccde287a086f5748a to your computer and use it in GitHub Desktop.
Extenstion function to print in the logcat with default and custom log tag.
import android.util.Log
fun Any?.printToLog(tag: String = "DEBUG_LOG") {
Log.d(tag, toString())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment