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

Function ExamplePanic

log/log_example_test.go:126–131  ·  view source on GitHub ↗

Example of a log at a particular "level" (in this case, "panic")

()

Source from the content-addressed store, hash-verified

124
125// Example of a log at a particular "level" (in this case, "panic")
126func ExamplePanic() {
127 setup()
128
129 log.Panic().Msg("Cannot start")
130 // Outputs: {"level":"panic","time":1199811905,"message":"Cannot start"} then panics
131}
132
133// This example uses command-line flags to demonstrate various outputs
134// depending on the chosen log level.

Callers

nothing calls this directly

Calls 3

PanicFunction · 0.92
setupFunction · 0.85
MsgMethod · 0.80

Tested by

no test coverage detected