Skip to content

Instantly share code, notes, and snippets.

@PaulWoitaschek
Created September 29, 2016 08:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulWoitaschek/11201219842807d88027786f049db6a5 to your computer and use it in GitHub Desktop.
Save PaulWoitaschek/11201219842807d88027786f049db6a5 to your computer and use it in GitHub Desktop.
TM - logm IntelliJ life template for Timber
<template name="tm" value="timber.log.Timber.d($content$);" description="Log method name and its arguments" toReformat="true" toShortenFQNames="true">
<variable name="content" expression="groovyScript(&quot;def params = _2.collect {it + ' = [%s]'}.join(', '); return '\&quot;' + _1 + '() called' + (params.empty ? '' : ' with: ' + params + ',') + '\&quot;' + (_2.empty ? '' : ','+_2.join(','))&quot;, methodName(), methodParameters()) " defaultValue="" alwaysStopAt="false" />
<context>
<option name="JAVA_STATEMENT" value="true" />
</context>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment