diff --git a/api/types/container/host_config.go b/api/types/container/host_config.go index 77195bf2ed..dcea6c8a5a 100644 --- a/api/types/container/host_config.go +++ b/api/types/container/host_config.go @@ -341,7 +341,7 @@ type LogMode string // Available logging modes const ( - LogModeUnset = "" + LogModeUnset LogMode = "" LogModeBlocking LogMode = "blocking" LogModeNonBlock LogMode = "non-blocking" ) diff --git a/daemon/logger/loggerutils/cache/local_cache.go b/daemon/logger/loggerutils/cache/local_cache.go index 1ca19eb5db..c5e8fc2cac 100644 --- a/daemon/logger/loggerutils/cache/local_cache.go +++ b/daemon/logger/loggerutils/cache/local_cache.go @@ -36,7 +36,7 @@ func WithLocalCache(l logger.Logger, info logger.Info) (logger.Logger, error) { return nil, errors.Wrap(err, "error initializing local log cache driver") } - if info.Config["mode"] == container.LogModeUnset || container.LogMode(info.Config["mode"]) == container.LogModeNonBlock { + if container.LogMode(info.Config["mode"]) == container.LogModeUnset || container.LogMode(info.Config["mode"]) == container.LogModeNonBlock { var size int64 = -1 if s, exists := info.Config["max-buffer-size"]; exists { size, err = units.RAMInBytes(s)