PowerShell使用sudo提升为管理员权限

> 1、logm 参数日志打印
1
log.info($content$,$params$);

content参数:

1
groovyScript("def params = _2.collect {'【'+it+' = {}】'}.join(', '); return '\"' + _1 + '() called with parameters => ' + (params.empty  ? '' : params) + '\"'", methodName(), methodParameters())

params参数:

1
groovyScript("def params = _1.collect {it}.join(', '); return   (params.empty  ? '' : params) ",  methodParameters())

2、logr 结果日志打印

1
log.info("$METHOD_NAME$() returned: " +  $result$);

METHOD_NAME参数:

1
methodName()

result参数:

1
variableOfType(methodReturnType())

3、loge 异常日志打印

1
log.error($content$,$params$);

content 参数:

1
groovyScript("def params = _2.collect {'【'+it+' = {}】'}.join(', '); return '\"' + _1 + '() called with exception => ' + (params.empty  ? '' : params) + '\"'", methodName(), methodParameters())

params参数:

1
groovyScript("def params = _1.collect {it}.join(', '); return   (params.empty  ? '' : params) + ',e' ",  methodParameters())