Skip to content

Commit bd9534b

Browse files
author
Lisa Ugray
committed
Test Log
1 parent e8fd0ba commit bd9534b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

logrus_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,15 @@ func TestWarn(t *testing.T) {
111111
})
112112
}
113113

114+
func TestLog(t *testing.T) {
115+
LogAndAssertJSON(t, func(log *Logger) {
116+
log.Log(WarnLevel, "test")
117+
}, func(fields Fields) {
118+
assert.Equal(t, "test", fields["msg"])
119+
assert.Equal(t, "warning", fields["level"])
120+
})
121+
}
122+
114123
func TestInfolnShouldAddSpacesBetweenStrings(t *testing.T) {
115124
LogAndAssertJSON(t, func(log *Logger) {
116125
log.Infoln("test", "test")

0 commit comments

Comments
 (0)