moby/api/server
Cory Snider c2d69d06b0 api/s/r/swarm: log backend errors at Debug level
The errors are already returned to the client in the API response, so
logging them to the daemon log is redundant. Log the errors at level
Debug so as not to pollute the end-users' daemon logs with noise.

Refactor the logs to use structured fields. Add the request context to
the log entry so that logrus hooks could annotate the log entries with
contextual information about the API request in the hypothetical future.

Fixes #44997

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit a4e3c67e44)
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 11:30:06 -05:00
..
backend/build API: add "prune" events 2020-07-28 12:41:14 +02:00
httpstatus errdefs: move GetHTTPErrorStatusCode to api/server/httpstatus 2022-03-21 12:22:39 +01:00
httputils api/server/httputils: move WriteJSON() together with ReadJSON() 2022-04-11 21:37:57 +02:00
middleware api/server: fix empty-lines (revive) 2022-10-01 00:01:13 +02:00
router api/s/r/swarm: log backend errors at Debug level 2023-02-16 11:30:06 -05:00
errorhandler.go errdefs: move GetHTTPErrorStatusCode to api/server/httpstatus 2022-03-21 12:22:39 +01:00
middleware.go api/server: remove "Logging" from config 2022-04-23 23:38:30 +02:00
server.go set ReadHeaderTimeout to address G112: Potential Slowloris Attack (gosec) 2022-09-22 12:27:32 +02:00
server_test.go api/server: use constants for http methods 2019-10-13 17:30:19 +02:00