MCPcopy Create free account
hub / github.com/DoNewsCode/core / Example_level

Function Example_level

logging/example_test.go:19–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17}
18
19func Example_level() {
20 logger := logging.NewLogger("json")
21 level.Info(logger).Log("foo", "bar")
22 // Output:
23 // {"foo":"bar","level":"info"}
24}
25
26func ExampleWithLevel() {
27 logger := logging.NewLogger("json")

Callers

nothing calls this directly

Calls 3

NewLoggerFunction · 0.92
LogMethod · 0.80
InfoMethod · 0.65

Tested by

no test coverage detected