Skip to content

Commit

Permalink
create test to prove issue sirupsen#954
Browse files Browse the repository at this point in the history
  • Loading branch information
admacleod committed Mar 19, 2020
1 parent 6f5e581 commit 013c865
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions entry_test.go
Expand Up @@ -243,3 +243,14 @@ func TestEntryLogfLevel(t *testing.T) {
entry.Logf(WarnLevel, "%s", "warn")
assert.Contains(t, buffer.String(), "warn")
}

func TestEntryReportCallerRace(t *testing.T) {
logger := New()
entry := NewEntry(logger)
go func() {
logger.SetReportCaller(true)
}()
go func() {
entry.Info("should not race")
}()
}

0 comments on commit 013c865

Please sign in to comment.