MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / WarnServer

Function WarnServer

internal/remotelogs/utils.go:84–106  ·  view source on GitHub ↗

WarnServer 打印服务相关警告

(tag string, description string)

Source from the content-addressed store, hash-verified

82
83// WarnServer 打印服务相关警告
84func WarnServer(tag string, description string) {
85 if Tea.IsTesting() {
86 logs.Println("[" + tag + "]" + description)
87 }
88
89 nodeConfig, _ := nodeconfigs.SharedNodeConfig()
90 if nodeConfig != nil && nodeConfig.GlobalServerConfig != nil && !nodeConfig.GlobalServerConfig.Log.RecordServerError {
91 return
92 }
93
94 select {
95 case logChan <- &pb.NodeLog{
96 Role: teaconst.Role,
97 Tag: tag,
98 Description: description,
99 Level: "warning",
100 NodeId: teaconst.NodeId,
101 CreatedAt: time.Now().Unix(),
102 }:
103 default:
104
105 }
106}
107
108// Error 打印错误信息
109func Error(tag string, description string) {

Callers 2

doCacheReadMethod · 0.92
doOriginRequestMethod · 0.92

Calls 1

UnixMethod · 0.80

Tested by

no test coverage detected