feat: 连接主机终端.

This commit is contained in:
lijiahang
2024-01-02 18:51:07 +08:00
parent 90ffc472fa
commit f7867a8bcb
13 changed files with 254 additions and 14 deletions

View File

@@ -39,4 +39,6 @@ public interface FieldConst {
String TARGET = "target";
String TOKEN = "token";
}

View File

@@ -9,6 +9,7 @@ import com.orion.lang.utils.Strings;
import com.orion.lang.utils.json.matcher.ReplacementFormatters;
import com.orion.ops.framework.biz.operator.log.core.config.OperatorLogConfig;
import com.orion.ops.framework.biz.operator.log.core.enums.ReturnType;
import com.orion.ops.framework.biz.operator.log.core.factory.OperatorTypeHolder;
import com.orion.ops.framework.biz.operator.log.core.model.OperatorLogModel;
import com.orion.ops.framework.biz.operator.log.core.model.OperatorType;
import com.orion.ops.framework.common.entity.RequestIdentity;
@@ -159,6 +160,17 @@ public class OperatorLogFiller implements Gettable<OperatorLogModel> {
return this.fillResult(null, null, exception);
}
/**
* 填充结果
*
* @param ret ret
* @param exception exception
* @return this
*/
public OperatorLogFiller fillResult(Object ret, Throwable exception) {
return this.fillResult(ReturnType.JSON, ret, exception);
}
/**
* 填充结果
*
@@ -209,6 +221,17 @@ public class OperatorLogFiller implements Gettable<OperatorLogModel> {
return this;
}
/**
* 填充日志信息
*
* @param extra extra
* @param type type
* @return this
*/
public OperatorLogFiller fillLogInfo(Map<String, Object> extra, String type) {
return this.fillLogInfo(extra, OperatorTypeHolder.get(type));
}
/**
* 填充日志信息
*