From 76ef07bc8bcbdf9354192fd4f31ffbc07086b46b Mon Sep 17 00:00:00 2001 From: kun Date: Tue, 24 Apr 2018 10:33:02 +0800 Subject: [PATCH] remove log format type check Option `LogConfig` is omitempty in config. That means we allow `c.HostConfig.LogConfig` is nil. There is no need to check the log type, we don't use it now in log sub command, maybe in the furture. --- cli/logs.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cli/logs.go b/cli/logs.go index 4a19e83ca5..8c658bb4f3 100644 --- a/cli/logs.go +++ b/cli/logs.go @@ -68,10 +68,6 @@ func (lc *LogsCommand) runLogs(args []string) error { return err } - if !validDrivers[c.HostConfig.LogConfig.Type] { - return fmt.Errorf("\"logs\" command is supported only for \"json-file\" and \"journald\" logging drivers (got; %s)", c.HostConfig.LogConfig.Type) - } - opts := types.ContainerLogsOptions{ ShowStdout: true, ShowStderr: true,