Ver Fonte

Merge pull request #20994 from runcom/fix-debugf

api: server: server: remove redunant debugf
Vincent Demeester há 9 anos atrás
pai
commit
64a4a7a191
2 ficheiros alterados com 1 adições e 4 exclusões
  1. 1 1
      api/server/middleware/debug.go
  2. 0 3
      api/server/server.go

+ 1 - 1
api/server/middleware/debug.go

@@ -15,7 +15,7 @@ import (
 // DebugRequestMiddleware dumps the request to logger
 func DebugRequestMiddleware(handler httputils.APIFunc) httputils.APIFunc {
 	return func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
-		logrus.Debugf("%s %s", r.Method, r.RequestURI)
+		logrus.Debugf("Calling %s %s", r.Method, r.RequestURI)
 
 		if r.Method != "POST" {
 			return handler(ctx, w, r, vars)

+ 0 - 3
api/server/server.go

@@ -114,9 +114,6 @@ func (s *HTTPServer) Close() error {
 
 func (s *Server) makeHTTPHandler(handler httputils.APIFunc) http.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) {
-		// log the handler call
-		logrus.Debugf("Calling %s %s", r.Method, r.URL.Path)
-
 		// Define the context that we'll pass around to share info
 		// like the docker-request-id.
 		//