|
<templateSet group="AndroidLogKotlin"> |
|
<template name="logm" value="android.util.Log.d(TAG, $FORMAT$)" description="Log method name and its arguments" toReformat="true" toShortenFQNames="true"> |
|
<variable name="FORMAT" 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="logd" value="android.util.Log.d(TAG, "$METHOD_NAME$: $content$")" description="Log.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="loge" value="android.util.Log.e(TAG, "$METHOD_NAME$: $content$", $exception$)" description="Log.e(Exception, String)" 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="true" /> |
|
<context> |
|
<option name="KOTLIN_STATEMENT" value="true" /> |
|
</context> |
|
</template> |
|
<template name="logi" value="android.util.Log.i(TAG, "$METHOD_NAME$: $content$")" description="Log.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="logw" value="android.util.Log.w(TAG, "$METHOD_NAME$: $content$")" description="Log.w(Exception, 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="logwtf" value="android.util.Log.wtf(TAG, "$METHOD_NAME$: $content$")" description="Log.wtf(Exception, 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="logt" value="private val TAG = $NAME$::class.java.simpleName" description="A static logtag with your current classname" toReformat="true" toShortenFQNames="true"> |
|
<variable name="NAME" expression="fileNameWithoutExtension()" defaultValue="" alwaysStopAt="false" /> |
|
<context> |
|
<option name="KOTLIN" value="true" /> |
|
</context> |
|
</template> |
|
</templateSet> |