MCPcopy Create free account
hub / github.com/labstack/gommon / TestFormat

Function TestFormat

log/log_test.go:95–102  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestFormat(t *testing.T) {
96 l := New("test")
97 l.SetHeader("${level} | ${prefix}")
98 b := new(bytes.Buffer)
99 l.SetOutput(b)
100 l.Info("info")
101 assert.Equal(t, "INFO | test info\n", b.String())
102}
103
104func TestJSON(t *testing.T) {
105 l := New("test")

Callers

nothing calls this directly

Calls 5

SetHeaderMethod · 0.80
InfoMethod · 0.80
StringMethod · 0.80
NewFunction · 0.70
SetOutputMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…