mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-10 12:00:28 +08:00
某个服务端口启动失败后,会自动重试
This commit is contained in:
@@ -93,7 +93,7 @@ func Error(tag string, description string) {
|
||||
}
|
||||
}
|
||||
|
||||
// ServerError 打印错误信息
|
||||
// ServerError 打印服务相关错误信息
|
||||
func ServerError(serverId int64, tag string, description string) {
|
||||
logs.Println("[" + tag + "]" + description)
|
||||
|
||||
@@ -117,6 +117,30 @@ func ServerError(serverId int64, tag string, description string) {
|
||||
}
|
||||
}
|
||||
|
||||
// ServerSuccess 打印服务相关成功信息
|
||||
func ServerSuccess(serverId int64, tag string, description string) {
|
||||
logs.Println("[" + tag + "]" + description)
|
||||
|
||||
nodeConfig, _ := nodeconfigs.SharedNodeConfig()
|
||||
if nodeConfig == nil {
|
||||
return
|
||||
}
|
||||
|
||||
select {
|
||||
case logChan <- &pb.NodeLog{
|
||||
Role: teaconst.Role,
|
||||
Tag: tag,
|
||||
Description: description,
|
||||
Level: "success",
|
||||
NodeId: nodeConfig.Id,
|
||||
ServerId: serverId,
|
||||
CreatedAt: time.Now().Unix(),
|
||||
}:
|
||||
default:
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 上传日志
|
||||
func uploadLogs() error {
|
||||
logList := []*pb.NodeLog{}
|
||||
|
||||
Reference in New Issue
Block a user