[ Server ] [ Server ] - 增加服务器角色部分的内容

This commit is contained in:
zeaslity
2023-10-08 14:30:17 +08:00
parent 9197031e81
commit 2594514a87
29 changed files with 416 additions and 209 deletions

View File

@@ -67,9 +67,9 @@ func Execute(em *ExecutionMessage) ([]string, error) {
resultLog = append(resultLog, "↓↓↓ 命令 Error 如下 ↓↓↓", err.Error())
}
// debug
commandResult := fmt.Sprintf("Excution Comand are=> %v, Executor Result: %v", realCommand, resultLog)
log.Info(commandResult)
log.Debug(commandResult)
return resultLog, err
}
@@ -119,12 +119,10 @@ func MultiLineCommandExecutor(multiLineCommandExecutor [][]string) ([]string, er
for _, singleLineCommand := range multiLineCommandExecutor {
singleLogs, err := AllOutputCommandExecutor(singleLineCommand)
res = append(res, singleLogs...)
if err != nil {
log.Error(fmt.Sprintf("Execution error ! command is %v, error is %v", singleLineCommand, err))
return res, err
}
}
return res, nil