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

Function ExampleLog

log/log_example_test.go:53–58  ·  view source on GitHub ↗

Example of a log with no particular "level"

()

Source from the content-addressed store, hash-verified

51
52// Example of a log with no particular "level"
53func ExampleLog() {
54 setup()
55 log.Log().Msg("hello world")
56
57 // Output: {"time":1199811905,"message":"hello world"}
58}
59
60// Example of a conditional level based on the presence of an error.
61func ExampleErr() {

Callers

nothing calls this directly

Calls 3

LogFunction · 0.92
setupFunction · 0.85
MsgMethod · 0.80

Tested by

no test coverage detected