来源: 【我把老婆(冰冰)放到了Idea 里!这是一个正经视频,后面还讲了代码快速补全,live template 打日志。】 【精准空降到 05:46】 https://www.bilibili.com/video/BV1uR4y1p7Lh/?share_source=copy_web&vd_source=af63ea840971731c498a30c3de502821&t=346
loge
log.error($content$,$params$);
content 参数:
groovyScript("def params = _2.collect {'【'+it+' = {}】'}.join(', '); return '\"[[title='+_1+']] ' + _1 + '() called with exception => ' + (params.empty ? '' : params) + '\"'", methodName(), methodParameters())
params参数:
groovyScript("def params = _1.collect {it}.join(', '); return (params.empty ? '' : params) + ',e' ", methodParameters())
logm
log.info($content$,$params$);
content参数:
groovyScript("def params = _2.collect {'【'+it+' = {}】'}.join(', '); return '\"[[title='+_1+']] ' + _1 + '() called with parameters => ' + (params.empty ? '' : params) + '\"'", methodName(), methodParameters())
params参数:
groovyScript("def params = _1.collect {it}.join(', '); return (params.empty ? '' : params) ", methodParameters())
logr
log.info("[[title=$METHOD_NAME$]] $METHOD_NAME$() returned: " + $result$);
METHOD_NAME参数:
methodName()
result参数:
variableOfType(methodReturnType())