rename fieldLogger to entry

This commit is contained in:
Michael Haines 2018-02-05 12:52:11 -07:00
parent eeb653535c
commit 828a649ef2
1 changed files with 3 additions and 3 deletions

View File

@ -343,18 +343,18 @@ func TestLoggingRace(t *testing.T) {
wg.Wait()
}
func TestLoggingRaceWithHooksOnFieldLogger(t *testing.T) {
func TestLoggingRaceWithHooksOnEntry(t *testing.T) {
logger := New()
hook := new(ModifyHook)
logger.AddHook(hook)
fieldLogger := logger.WithField("context", "clue")
entry := logger.WithField("context", "clue")
var wg sync.WaitGroup
wg.Add(100)
for i := 0; i < 100; i++ {
go func() {
fieldLogger.Info("info")
entry.Info("info")
wg.Done()
}()
}