mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
api/server: remove "Logging" from config
The Logging boolean was unconditionally set to true and ignored in all locations, except for enabling the debugging middleware, which was also gated by the active logrus logging level. While it could make sense to have a Loglevel option configured on the API server, we don't have this currently, and to make that actually useful, that config would need to be tollerated by all locations that produce logs (which isn't the case either). Looking at the history of this option; a boolean to disable logging was originally added in commitc423a790d6
, which hard-coded it to "disabled" in a test, and "enabled" for the API server outside of tests (before that commit, logging was always enabled).02ddaad5d9
and5c42b2b512
changed the hard-coded values to be configurable through a `Logging` env-var (env- vars were used _internally_ at the time to pass on options), which later became a configuration struct ina0bf80fe03
. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e78f6f9c68
commit
cd054983ff
3 changed files with 1 additions and 3 deletions
|
@ -16,7 +16,7 @@ func (s *Server) handlerWithGlobalMiddlewares(handler httputils.APIFunc) httputi
|
|||
next = m.WrapHandler(next)
|
||||
}
|
||||
|
||||
if s.cfg.Logging && logrus.GetLevel() == logrus.DebugLevel {
|
||||
if logrus.GetLevel() == logrus.DebugLevel {
|
||||
next = middleware.DebugRequestMiddleware(next)
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ const versionMatcher = "/v{version:[0-9.]+}"
|
|||
|
||||
// Config provides the configuration for the API server
|
||||
type Config struct {
|
||||
Logging bool
|
||||
CorsHeaders string
|
||||
Version string
|
||||
SocketGroup string
|
||||
|
|
|
@ -569,7 +569,6 @@ func (cli *DaemonCli) getContainerdDaemonOpts() ([]supervisor.DaemonOpt, error)
|
|||
|
||||
func newAPIServerConfig(cli *DaemonCli) (*apiserver.Config, error) {
|
||||
serverConfig := &apiserver.Config{
|
||||
Logging: true,
|
||||
SocketGroup: cli.Config.SocketGroup,
|
||||
Version: dockerversion.Version,
|
||||
CorsHeaders: cli.Config.CorsHeaders,
|
||||
|
|
Loading…
Add table
Reference in a new issue