MCPcopy
hub / github.com/yusing/godoxy / logNotifyError

Function logNotifyError

internal/config/events.go:37–45  ·  view source on GitHub ↗
(action string, err error)

Source from the content-addressed store, hash-verified

35)
36
37func logNotifyError(action string, err error) {
38 log.Error().Err(err).Msg("config " + action + " error")
39 notif.Notify(&notif.LogMessage{
40 Level: zerolog.ErrorLevel,
41 Title: fmt.Sprintf("Config %s error", action),
42 Body: notif.ErrorBody(err),
43 })
44 events.Global.Add(events.NewEvent(events.LevelError, "config", action, err))
45}
46
47func logNotifyWarn(action string, err error) {
48 log.Warn().Err(err).Msg("config " + action + " warning")

Callers 3

LoadFunction · 0.85
ReloadFunction · 0.85
WatchChangesFunction · 0.85

Calls 5

NotifyFunction · 0.92
ErrorBodyFunction · 0.92
ErrMethod · 0.80
AddMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected