diff --git a/logrus.go b/logrus.go index 9fa2c99..2fe14b1 100644 --- a/logrus.go +++ b/logrus.go @@ -33,7 +33,7 @@ const ( type StandardLogger interface { Print(...interface{}) Printf(string, ...interface{}) - Printfln(...interface{}) + Println(...interface{}) Fatal(...interface{}) Fatalf(string, ...interface{}) diff --git a/logrus_test.go b/logrus_test.go index 64baa40..e94fd3b 100644 --- a/logrus_test.go +++ b/logrus_test.go @@ -33,6 +33,24 @@ func TestPrint(t *testing.T) { }) } +func TestPrintf(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Printf("%s", "test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["level"], "info") + }) +} + +func TestPrintln(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Println("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["level"], "info") + }) +} + func TestInfo(t *testing.T) { LogAndAssertJSON(t, func(log *Logger) { log.Info("test")