From a85ca8b7c40f05f2b6471cc30fb8d5271605c1d1 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Thu, 14 May 2015 10:07:21 -0700 Subject: [PATCH] add link between -D and --log-level=debug back in Due to popular demand :-) See #11965 Signed-off-by: Doug Davis --- docker/docker.go | 1 + integration-cli/docker_cli_daemon_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docker/docker.go b/docker/docker.go index c6caafd83e..fd40f4b422 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -56,6 +56,7 @@ func main() { if *flDebug { os.Setenv("DEBUG", "1") + setLogLevel(logrus.DebugLevel) } if len(flHosts) == 0 { diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go index b2eb46bd07..65e1fed364 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -232,8 +232,8 @@ func (s *DockerDaemonSuite) TestDaemonFlagD(c *check.C) { c.Fatal(err) } content, _ := ioutil.ReadFile(s.d.logFile.Name()) - if strings.Contains(string(content), `level=debug`) { - c.Fatalf(`Should not have level="debug" in log file using -D:\n%s`, string(content)) + if !strings.Contains(string(content), `level=debug`) { + c.Fatalf(`Should have level="debug" in log file using -D:\n%s`, string(content)) } } @@ -242,8 +242,8 @@ func (s *DockerDaemonSuite) TestDaemonFlagDebug(c *check.C) { c.Fatal(err) } content, _ := ioutil.ReadFile(s.d.logFile.Name()) - if strings.Contains(string(content), `level=debug`) { - c.Fatalf(`Should not have level="debug" in log file using --debug:\n%s`, string(content)) + if !strings.Contains(string(content), `level=debug`) { + c.Fatalf(`Should have level="debug" in log file using --debug:\n%s`, string(content)) } } @@ -252,8 +252,8 @@ func (s *DockerDaemonSuite) TestDaemonFlagDebugLogLevelFatal(c *check.C) { c.Fatal(err) } content, _ := ioutil.ReadFile(s.d.logFile.Name()) - if strings.Contains(string(content), `level=debug`) { - c.Fatalf(`Should not have level="debug" in log file when using both --debug and --log-level=fatal:\n%s`, string(content)) + if !strings.Contains(string(content), `level=debug`) { + c.Fatalf(`Should have level="debug" in log file when using both --debug and --log-level=fatal:\n%s`, string(content)) } }