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

Function ExamplePrintf

log/log_example_test.go:45–50  ·  view source on GitHub ↗

Simple logging example using the Printf function in the log package

()

Source from the content-addressed store, hash-verified

43
44// Simple logging example using the Printf function in the log package
45func ExamplePrintf() {
46 setup()
47
48 log.Printf("hello %s", "world")
49 // Output: {"level":"debug","time":1199811905,"message":"hello world"}
50}
51
52// Example of a log with no particular "level"
53func ExampleLog() {

Callers

nothing calls this directly

Calls 2

PrintfFunction · 0.92
setupFunction · 0.85

Tested by

no test coverage detected