Skip to content

Instantly share code, notes, and snippets.

@fergusonm
Created September 3, 2019 14:29
Show Gist options
  • Save fergusonm/bc12dfe20562389c6064c1efa158ce66 to your computer and use it in GitHub Desktop.
Save fergusonm/bc12dfe20562389c6064c1efa158ce66 to your computer and use it in GitHub Desktop.
Method level logging live template. Logs the method name with all arguments.
Saved as "mlog" with Kotlin statement applicability. (Obviously change to suit your own needs.)
android.util.Log.d("LOGLOGLOG", "$className$ $METHOD_NAME$() called with: " + $args$)
Params:
classname - kotlinClassName()
METHOD_NAME - kotlinFunctionName()
args - groovyScript("'\"' + _1.collect { it + ' = [\" + ' + it + ' + \"]'}.join(', ') + '\"'", functionParameters())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment