From 35fa199c5ae20695f11cc751614e1be619d2a54d Mon Sep 17 00:00:00 2001 From: john Date: Thu, 1 Nov 2018 08:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9C=8D=E5=8A=A1=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E6=97=B6=E4=B8=8D=E7=AC=A6=E5=90=88=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=9A=84=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=96=B9=E5=BC=8F:=20glog.Warning->glog.Error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g/net/ghttp/ghttp_server_service_controller.go | 6 +++--- g/net/ghttp/ghttp_server_service_object.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/g/net/ghttp/ghttp_server_service_controller.go b/g/net/ghttp/ghttp_server_service_controller.go index 2580c7428..e20fddb94 100644 --- a/g/net/ghttp/ghttp_server_service_controller.go +++ b/g/net/ghttp/ghttp_server_service_controller.go @@ -46,7 +46,7 @@ func (s *Server)BindController(pattern string, c Controller, methods...string) e if _, ok := v.Method(i).Interface().(func()); !ok { if methodMap != nil { s := fmt.Sprintf(`invalid medthod definition "%s", while "func()" is required`, v.Method(i).Type().String()) - glog.Warning(s) + glog.Error(s) return errors.New(s) } continue @@ -97,7 +97,7 @@ func (s *Server)BindControllerMethod(pattern string, c Controller, method string } if _, ok := fval.Interface().(func()); !ok { s := fmt.Sprintf(`invalid medthod definition "%s", while "func()" is required`, fval.Type().String()) - glog.Warning(s) + glog.Error(s) return errors.New(s) } pkgPath := t.Elem().PkgPath() @@ -136,7 +136,7 @@ func (s *Server)BindControllerRest(pattern string, c Controller) error { } if _, ok := v.Method(i).Interface().(func()); !ok { s := fmt.Sprintf(`invalid medthod definition "%s", while "func()" is required`, v.Method(i).Type().String()) - glog.Warning(s) + glog.Error(s) return errors.New(s) } pkgName := gfile.Basename(pkgPath) diff --git a/g/net/ghttp/ghttp_server_service_object.go b/g/net/ghttp/ghttp_server_service_object.go index 58e3cf246..ef64df4a1 100644 --- a/g/net/ghttp/ghttp_server_service_object.go +++ b/g/net/ghttp/ghttp_server_service_object.go @@ -53,7 +53,7 @@ func (s *Server)BindObject(pattern string, obj interface{}, methods...string) er if !ok { if methodMap != nil { s := fmt.Sprintf(`invalid medthod definition "%s", while "func(*Request))" is required`, v.Method(i).Type().String()) - glog.Warning(s) + glog.Error(s) return errors.New(s) } continue @@ -110,7 +110,7 @@ func (s *Server)BindObjectMethod(pattern string, obj interface{}, method string) faddr, ok := fval.Interface().(func(*Request)) if !ok { s := fmt.Sprintf(`invalid medthod definition "%s", while "func(*Request)" is required`, fval.Type().String()) - glog.Warning(s) + glog.Error(s) return errors.New(s) } finit := (func(*Request))(nil) @@ -165,7 +165,7 @@ func (s *Server)BindObjectRest(pattern string, obj interface{}) error { faddr, ok := v.Method(i).Interface().(func(*Request)) if !ok { s := fmt.Sprintf(`invalid medthod definition "%s", while "func()" is required`, v.Method(i).Type().String()) - glog.Warning(s) + glog.Error(s) return errors.New(s) } pkgName := gfile.Basename(pkgPath)