Skip to content

Instantly share code, notes, and snippets.

@banasiak
Last active March 24, 2017 20:25
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 banasiak/38443bae461b462d64872532cd866bd3 to your computer and use it in GitHub Desktop.
Save banasiak/38443bae461b462d64872532cd866bd3 to your computer and use it in GitHub Desktop.
Android Studio live code template for logging a method name and its arguments using Timber
Timber.d($content$);
content:
groovyScript("def params = _2.collect {it + ' = [%s]'}.join(', '); def params2 = _2.collect {it}.join(', '); return '\"' + _1 + '() called' + (params.empty ? '' : ' with: ' + params) + '\"' + (params2.empty ? '' : ', ' + params2)", methodName(), methodParameters())
Applicable in Java: statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment