mirror of https://github.com/sirupsen/logrus.git
rename fieldLogger to entry
This commit is contained in:
parent
eeb653535c
commit
828a649ef2
|
@ -343,18 +343,18 @@ func TestLoggingRace(t *testing.T) {
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLoggingRaceWithHooksOnFieldLogger(t *testing.T) {
|
func TestLoggingRaceWithHooksOnEntry(t *testing.T) {
|
||||||
logger := New()
|
logger := New()
|
||||||
hook := new(ModifyHook)
|
hook := new(ModifyHook)
|
||||||
logger.AddHook(hook)
|
logger.AddHook(hook)
|
||||||
fieldLogger := logger.WithField("context", "clue")
|
entry := logger.WithField("context", "clue")
|
||||||
|
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
wg.Add(100)
|
wg.Add(100)
|
||||||
|
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
go func() {
|
go func() {
|
||||||
fieldLogger.Info("info")
|
entry.Info("info")
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue