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

Function TestSetReportCallerRace

logrus_test.go:782–797  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

780}
781
782func TestSetReportCallerRace(t *testing.T) {
783 l := New()
784 l.Out = io.Discard
785 l.SetReportCaller(true)
786
787 var wg sync.WaitGroup
788 wg.Add(100)
789
790 for i := 0; i < 100; i++ {
791 go func() {
792 l.Error("Some Error")
793 wg.Done()
794 }()
795 }
796 wg.Wait()
797}

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
SetReportCallerMethod · 0.80
AddMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected