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

Method Discard

event.go:103–109  ·  view source on GitHub ↗

Discard disables the event so Msg(f) won't print it.

()

Source from the content-addressed store, hash-verified

101
102// Discard disables the event so Msg(f) won't print it.
103func (e *Event) Discard() *Event {
104 if e == nil {
105 return e
106 }
107 e.level = Disabled
108 return nil
109}
110
111// Msg sends the *Event with msg added as the message field if not empty.
112//

Callers 2

TestDiscardFunction · 0.80
hook_test.goFile · 0.80

Calls

no outgoing calls

Tested by 1

TestDiscardFunction · 0.64