Просмотр исходного кода

The loggingMiddleware function is adding lots of messages to the log

When tools like kubernetes and cockpit are talking to the docker daemon
actively, we are seeing large number of log messages that look like debug
information.

For example

docker info adds the following line to journald.

Nov 26 07:09:23 dhcp-10-19-62-196.boston.devel.redhat.com docker[32686]: time="2015-11-26T07:09:23.124503455-05:00" level=info msg="GET /v1.22/info"

We think this should be Debug level not Info level.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Dan Walsh 9 лет назад
Родитель
Сommit
cf4fb15088
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      api/server/middleware.go

+ 1 - 1
api/server/middleware.go

@@ -25,7 +25,7 @@ type middleware func(handler httputils.APIFunc) httputils.APIFunc
 func (s *Server) loggingMiddleware(handler httputils.APIFunc) httputils.APIFunc {
 	return func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
 		if s.cfg.Logging {
-			logrus.Infof("%s %s", r.Method, r.RequestURI)
+			logrus.Debugf("%s %s", r.Method, r.RequestURI)
 		}
 		return handler(ctx, w, r, vars)
 	}