Merge pull request #1047 from lwsanty/fix-race-conditions-on-entry

fix race conditions on entry
This commit is contained in:
Mark Phelps
2020-02-26 18:44:58 -05:00
committed by GitHub
2 changed files with 6 additions and 4 deletions
+4 -4
View File
@@ -210,7 +210,7 @@ func TestEntryWithIncorrectField(t *testing.T) {
fn := func() {}
e := Entry{}
e := &Entry{Logger: New()}
eWithFunc := e.WithFields(Fields{"func": fn})
eWithFuncPtr := e.WithFields(Fields{"funcPtr": &fn})
@@ -238,8 +238,8 @@ func TestEntryLogfLevel(t *testing.T) {
entry := NewEntry(logger)
entry.Logf(DebugLevel, "%s", "debug")
assert.NotContains(t, buffer.String(), "debug", )
assert.NotContains(t, buffer.String(), "debug")
entry.Logf(WarnLevel, "%s", "warn")
assert.Contains(t, buffer.String(), "warn", )
}
assert.Contains(t, buffer.String(), "warn")
}