diff --git a/zerolog_test.go b/zerolog_test.go index 7ff7f24..1b194f7 100644 --- a/zerolog_test.go +++ b/zerolog_test.go @@ -66,8 +66,7 @@ func TestWithFields(t *testing.T) { func TestWithError(t *testing.T) { logger.DefaultLogger = NewLogger() - - logger.WithError(errors.New("I am Error")).Logf(logger.ErrorLevel, "testing: %s", "WithError") + logger.Fields(map[string]interface{}{"error": errors.New("I am Error")}).Logf(logger.ErrorLevel, "testing: %s", "WithError") } func TestWithHooks(t *testing.T) {