diff --git a/middleware/recovery/recovery.go b/middleware/recovery/recovery.go index dfa7cb7fd..66dcec182 100644 --- a/middleware/recovery/recovery.go +++ b/middleware/recovery/recovery.go @@ -29,12 +29,6 @@ func WithHandler(h HandlerFunc) Option { } } -// WithLogger with recovery logger. -// Deprecated: use global logger instead. -func WithLogger(logger log.Logger) Option { - return func(o *options) {} -} - // Recovery is a server middleware that recovers from any panics. func Recovery(opts ...Option) middleware.Middleware { op := options{ diff --git a/middleware/recovery/recovery_test.go b/middleware/recovery/recovery_test.go index 985cb19b0..cf4a7fbb3 100644 --- a/middleware/recovery/recovery_test.go +++ b/middleware/recovery/recovery_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/go-kratos/kratos/v2/errors" - "github.com/go-kratos/kratos/v2/log" ) func TestOnce(t *testing.T) { @@ -35,8 +34,3 @@ func TestNotPanic(t *testing.T) { t.Errorf("e isn't nil") } } - -// Deprecated: Remove this test with WithLogger method. -func TestWithLogger(t *testing.T) { - _ = WithLogger(log.DefaultLogger) -}