MCPcopy
hub / github.com/rs/zerolog / msg

Method msg

event.go:150–167  ·  view source on GitHub ↗
(msg string)

Source from the content-addressed store, hash-verified

148}
149
150func (e *Event) msg(msg string) {
151 for _, hook := range e.ch {
152 hook.Run(e, e.level, msg)
153 }
154 if msg != "" {
155 e.buf = enc.AppendString(enc.AppendKey(e.buf, MessageFieldName), msg)
156 }
157 if e.done != nil {
158 defer e.done(msg)
159 }
160 if err := e.write(); err != nil {
161 if ErrorHandler != nil {
162 ErrorHandler(err)
163 } else {
164 fmt.Fprintf(os.Stderr, "zerolog: could not write event: %v\n", err)
165 }
166 }
167}
168
169// Fields is a helper function to use a map or slice to set fields using type assertion.
170// Only map[string]interface{} and []interface{} are accepted. []interface{} must

Callers 4

MsgMethod · 0.95
SendMethod · 0.95
MsgfMethod · 0.95
MsgFuncMethod · 0.95

Calls 4

writeMethod · 0.95
RunMethod · 0.65
AppendStringMethod · 0.65
AppendKeyMethod · 0.65

Tested by

no test coverage detected