MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / Error

Function Error

internal/remotelogs/utils.go:109–130  ·  view source on GitHub ↗

Error 打印错误信息

(tag string, description string)

Source from the content-addressed store, hash-verified

107
108// Error 打印错误信息
109func Error(tag string, description string) {
110 logs.Println("[" + tag + "]" + description)
111
112 // 忽略RPC连接错误
113 var level = "error"
114 if strings.Contains(description, "code = Unavailable desc") {
115 level = "warning"
116 }
117
118 select {
119 case logChan <- &pb.NodeLog{
120 Role: teaconst.Role,
121 Tag: tag,
122 Description: description,
123 Level: level,
124 NodeId: teaconst.NodeId,
125 CreatedAt: time.Now().Unix(),
126 }:
127 default:
128
129 }
130}
131
132// ErrorServer 打印服务相关错误信息
133func ErrorServer(tag string, description string) {

Callers 15

DefaultStoreFunction · 0.92
ErrorfMethod · 0.92
FatalfMethod · 0.92
processErrMethod · 0.92
StartMethod · 0.92
StartMethod · 0.92
UpdateMethod · 0.92
StartMethod · 0.92
UpdateActionsMethod · 0.92
AddItemMethod · 0.92
DeleteItemMethod · 0.92
createInstanceMethod · 0.92

Calls 2

UnixMethod · 0.80
ContainsMethod · 0.45

Tested by

no test coverage detected