validate log-opt when creating containers AGAIN

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 068085005ef378f6320fdce90a67b104399b796d
Component: engine
This commit is contained in:
Shijiang Wei
2016-03-02 20:30:26 +08:00
parent 5692b958f8
commit 5c70b34f09
5 changed files with 25 additions and 23 deletions
-13
View File
@@ -282,19 +282,6 @@ func (container *Container) exposes(p nat.Port) bool {
return exists
}
// GetLogConfig returns the log configuration for the container.
func (container *Container) GetLogConfig(defaultConfig containertypes.LogConfig) containertypes.LogConfig {
cfg := container.HostConfig.LogConfig
if cfg.Type != "" || len(cfg.Config) > 0 { // container has log driver configured
if cfg.Type == "" {
cfg.Type = jsonfilelog.Name
}
return cfg
}
// Use daemon's default log config for containers
return defaultConfig
}
// StartLogger starts a new logger driver for the container.
func (container *Container) StartLogger(cfg containertypes.LogConfig) (logger.Logger, error) {
c, err := logger.GetLogDriver(cfg.Type)