Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
19
func
Example_level() {
20
logger := logging.NewLogger(
"json"
)
21
level.Info(logger).Log(
"foo"
,
"bar"
)
22
// Output:
23
// {"foo":"bar","level":"info"}
24
}
25
26
func
ExampleWithLevel() {
27
logger := logging.NewLogger(
"json"
)
Callers
nothing calls this directly
Calls
3
NewLogger
Function · 0.92
Log
Method · 0.80
Info
Method · 0.65
Tested by
no test coverage detected