mirror of https://github.com/sirupsen/logrus.git
create test to prove issue sirupsen/logrus#954
This commit is contained in:
parent
7ea96a3284
commit
e76a5c4450
|
@ -243,3 +243,14 @@ func TestEntryLogfLevel(t *testing.T) {
|
||||||
entry.Logf(WarnLevel, "%s", "warn")
|
entry.Logf(WarnLevel, "%s", "warn")
|
||||||
assert.Contains(t, buffer.String(), "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")
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue