Created
February 6, 2018 04:50
-
-
Save wickedev/faa4b15939dfea1d44e19d89634c242b to your computer and use it in GitHub Desktop.
Android Kotlin Timber
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<templateSet group="AndroidKotlinTimber"> | |
<template name="timd" value="timber.log.Timber.d("$METHOD_NAME$: $content$")" description="Timber.d(String)" toReformat="true" toShortenFQNames="true"> | |
<variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" /> | |
<variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="time" value="timber.log.Timber.e("$METHOD_NAME$() error with: e = [ $exception$$END$ ]")" description="Timber.e(String, Exception)" toReformat="true" toShortenFQNames="true"> | |
<variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" /> | |
<variable name="exception" expression="" defaultValue="e" alwaysStopAt="false" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="timi" value="timber.log.Timber.i("$METHOD_NAME$: $content$")" description="Timber.i(String)" toReformat="true" toShortenFQNames="true"> | |
<variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" /> | |
<variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="timm" value="timber.log.Timber.d($content$)" description="Timber Log method name and its arguments" toReformat="true" toShortenFQNames="true"> | |
<variable name="content" expression="groovyScript("def params = _2.collect {it + ' = [ $' + it + ' ]'}.join(', '); return '\"' + _1 + '() called' + (params.empty ? '' : ' with: ' + params) + '\"'", kotlinFunctionName(), functionParameters())" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="timr" value="timber.log.Timber.d("$METHOD_NAME$() returned: $END$")" description="Timber Log result of this method" toReformat="true" toShortenFQNames="true"> | |
<variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="timw" value="timber.log.Timber.w("$METHOD_NAME$: $content$, $exception$")" description="Timber.w(String, Exception)" toReformat="true" toShortenFQNames="true"> | |
<variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" /> | |
<variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="exception" expression="" defaultValue="e" alwaysStopAt="false" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
<template name="wtf" value="timber.log.Timber.wtf("$METHOD_NAME$: $content$, $exception$")" description="Timber.wtf(String, Exception)" toReformat="true" toShortenFQNames="true"> | |
<variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" /> | |
<variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="exception" expression="" defaultValue="e" alwaysStopAt="false" /> | |
<context> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
고맙습니다 _ _