MCPcopy
hub / github.com/dnote/dnote / ErrorWrap

Method ErrorWrap

pkg/server/log/log.go:130–134  ·  view source on GitHub ↗

ErrorWrap logs the given entry with the error message annotated by the given message

(err error, msg string)

Source from the content-addressed store, hash-verified

128
129// ErrorWrap logs the given entry with the error message annotated by the given message
130func (e Entry) ErrorWrap(err error, msg string) {
131 m := fmt.Sprintf("%s: %v", msg, err)
132
133 e.Error(m)
134}
135
136func (e Entry) formatJSON(level, msg string) []byte {
137 data := make(Fields, len(e.Fields)+4)

Callers 1

ErrorWrapFunction · 0.80

Calls 1

ErrorMethod · 0.95

Tested by

no test coverage detected