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

Method Panic

log.go:410–412  ·  view source on GitHub ↗

Panic starts a new message with panic level. The panic() function is called by the Msg method, which stops the ordinary flow of a goroutine. You must call Msg on the returned event in order to send the event.

()

Source from the content-addressed store, hash-verified

408//
409// You must call Msg on the returned event in order to send the event.
410func (l *Logger) Panic() *Event {
411 return l.newEvent(PanicLevel, func(msg string) { panic(msg) })
412}
413
414// WithLevel starts a new message with level. Unlike Fatal and Panic
415// methods, WithLevel does not terminate the program or stop the ordinary

Callers 4

TestPanicLevelFunction · 0.80
TestPanicDisabledFunction · 0.80
PanicFunction · 0.80
TestWriteWithAllLevelsFunction · 0.80

Calls 1

newEventMethod · 0.95

Tested by 3

TestPanicLevelFunction · 0.64
TestPanicDisabledFunction · 0.64
TestWriteWithAllLevelsFunction · 0.64