MCPcopy Index your code
hub / github.com/DoNewsCode/core / ExampleWithLevel

Function ExampleWithLevel

logging/example_test.go:26–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26func ExampleWithLevel() {
27 logger := logging.NewLogger("json")
28 levelLogger := logging.WithLevel(logger)
29 levelLogger.Info("hello")
30 // Output:
31 // {"caller":"example_test.go:29","level":"info","msg":"hello"}
32}
33
34func Example_sprintf() {
35 logger := logging.NewLogger("json")

Callers

nothing calls this directly

Calls 3

NewLoggerFunction · 0.92
WithLevelFunction · 0.92
InfoMethod · 0.65

Tested by

no test coverage detected