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)