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

Function ExampleError

log/log_example_test.go:104–109  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

102
103// Example of a log at a particular "level" (in this case, "error")
104func ExampleError() {
105 setup()
106 log.Error().Msg("hello world")
107
108 // Output: {"level":"error","time":1199811905,"message":"hello world"}
109}
110
111// Example of a log at a particular "level" (in this case, "fatal")
112func ExampleFatal() {

Callers

nothing calls this directly

Calls 3

ErrorFunction · 0.92
setupFunction · 0.85
MsgMethod · 0.80

Tested by

no test coverage detected