Commit Graph

9 Commits

Author SHA1 Message Date
David Calavera 82323294db Unify both debug logging middlewares.
We can remove one function from the stack by injecting the middleware
only when logging in enabled and the level is debug.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-01 14:33:33 -05:00
Dan Walsh cf4fb15088 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>
2015-11-26 07:10:38 -05:00
Vincent Demeester 8054a30387 dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-09 19:32:46 +01:00
Brian Goff b78ca243d9 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-27 21:23:53 -04:00
Vincent Demeester d5cd032a86 dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-27 20:36:07 +01:00
Brian Goff 37dbe07519 Dump request when daemon is set to debug
Uses a new middleware which calls httputils.DumpRequest which is output
to `logrus.Debug`.
This is implemented in a separate middleare so that we only have to
check the logging level when the router is instantiated rather than at
every request.
If this was just `logrus.Debug(httputil.DumpRequest(...))`, the
DumpRequest would be called on each request requardless of logging
level set on the daemon.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-23 09:04:32 -04:00
David Calavera da982cf551 Separate API router from server.
Implement basic interfaces to write custom routers that can be plugged
to the server. Remove server coupling with the daemon.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-29 19:43:03 -04:00
Tibor Vass 94e3b0f428 Use golang.org/x/net/context in api/server/
This patch removes the internal context package and uses golang's
package instead.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-09-29 17:40:55 -04:00
David Calavera 0fea04d27e Organize server pre-func logic in middlewares.
It defines global middlewares for every request.
This makes the server slightly more composable.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-21 14:27:06 -04:00