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

Method Msg

event.go:115–120  ·  event.go::Event.Msg

Msg sends the *Event with msg added as the message field if not empty. NOTICE: once this method is called, the *Event should be disposed. Calling Msg twice can have unexpected result.

(msg string)

Source from the content-addressed store, hash-verified

113// NOTICE: once this method is called, the *Event should be disposed.
114// Calling Msg twice can have unexpected result.
115func (e *Event) Msg(msg string) {
116 if e == nil {
117 return
118 }
119 e.msg(msg)
120}
121
122// Send is equivalent to calling Msg("").
123//

Callers 15

TestEvent_WithNilEventFunction · 0.95
ExampleNewFunction · 0.80
ExampleLogger_WithFunction · 0.80
ExampleLogger_LevelFunction · 0.80
ExampleLogger_SampleFunction · 0.80
ExampleLogger_HookFunction · 0.80
ExampleLogger_TraceFunction · 0.80
ExampleLogger_DebugFunction · 0.80
ExampleLogger_InfoFunction · 0.80
ExampleLogger_WarnFunction · 0.80
ExampleLogger_ErrorFunction · 0.80
ExampleLogger_WithLevelFunction · 0.80

Calls 1

msgMethod · 0.95

Tested by 15

TestEvent_WithNilEventFunction · 0.76
ExampleNewFunction · 0.64
ExampleLogger_WithFunction · 0.64
ExampleLogger_LevelFunction · 0.64
ExampleLogger_SampleFunction · 0.64
ExampleLogger_HookFunction · 0.64
ExampleLogger_TraceFunction · 0.64
ExampleLogger_DebugFunction · 0.64
ExampleLogger_InfoFunction · 0.64
ExampleLogger_WarnFunction · 0.64
ExampleLogger_ErrorFunction · 0.64
ExampleLogger_WithLevelFunction · 0.64