package dilog import ( "errors" "testing" "github.com/sirupsen/logrus" ) func TestTestLogger(t *testing.T) { l := NewTestLogger(t) l.Error("This is a test") l.WithField("foo", "bar").Warning("This is a test with fields") l.WithError(errors.New("hello")).Debug("debug message") } func TestTestLoggerDefaultLogger(t *testing.T) { NewTestLogger(t) logrus.Warn("default logrus message with stdlogger") logrus.Infof("info message: %d", 10) }