MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / TestLogger

Function TestLogger

pkg/component/component_test.go:51–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestLogger(t *testing.T) {
52 a := assertions.New(t)
53
54 mem := memory.New()
55
56 logger := log.NewLogger(mem)
57
58 // Component logger
59 {
60 c, err := component.New(logger, &component.Config{})
61 a.So(err, should.BeNil)
62
63 nbEntries := len(mem.Entries)
64 c.Logger().Info("Hello world")
65 a.So(mem.Entries, should.HaveLength, nbEntries+1)
66 }
67}
68
69type registererFunc func(s *web.Server)
70

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
NewLoggerFunction · 0.92
NewFunction · 0.92
LoggerMethod · 0.80
NewMethod · 0.65
InfoMethod · 0.65

Tested by

no test coverage detected