From a1154590f279c7a8019d2bc653b07109ef4ca1c4 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sun, 28 Jul 2019 19:43:50 +0100 Subject: [PATCH] Strip the verbosity of the debug handler --- debug.go | 7 +------ options.go | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/debug.go b/debug.go index 5f23534..782b8b1 100644 --- a/debug.go +++ b/debug.go @@ -5,11 +5,6 @@ import ( "github.com/micro/go-micro/server/debug" ) -// We use this to wrap any debug handlers so we preserve the signature Debug.{Method} -type Debug struct { - debug.DebugHandler -} - func registerDebugHandler(s server.Server) { - s.Handle(s.NewHandler(&Debug{s.Options().DebugHandler}, server.InternalHandler(true))) + s.Handle(s.NewHandler(&debug.Debug{s.Options().DebugHandler}, server.InternalHandler(true))) } diff --git a/options.go b/options.go index 65d82fc..4a3bef1 100644 --- a/options.go +++ b/options.go @@ -90,7 +90,7 @@ func newOptions(opt ...server.Option) server.Options { } if opts.DebugHandler == nil { - opts.DebugHandler = debug.DefaultDebugHandler + opts.DebugHandler = debug.DefaultHandler } if len(opts.Address) == 0 {