MCPcopy
hub / github.com/sirupsen/logrus / TestNewLocal

Function TestNewLocal

hooks/test/test_test.go:87–104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

85}
86
87func TestNewLocal(t *testing.T) {
88 assert := assert.New(t)
89 logger := logrus.New()
90
91 var wg sync.WaitGroup
92 defer wg.Wait()
93
94 wg.Add(10)
95 for i := 0; i < 10; i++ {
96 go func(i int) {
97 logger.Info("info")
98 wg.Done()
99 }(i)
100 }
101
102 hook := NewLocal(logger)
103 assert.NotNil(hook)
104}

Callers

nothing calls this directly

Calls 4

NewFunction · 0.92
NewLocalFunction · 0.85
AddMethod · 0.80
InfoMethod · 0.65

Tested by

no test coverage detected