Merge pull request #11965 from duglin/DEBUG

Remove use of "DEBUG" env var from CLI and de-couple -D from --log-level
This commit is contained in:
Jessie Frazelle
2015-05-12 18:24:04 -07:00
3 changed files with 7 additions and 12 deletions
+6 -6
View File
@@ -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(`Missing level="debug" in log file using -D:\n%s`, string(content))
if strings.Contains(string(content), `level=debug`) {
c.Fatalf(`Should not 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(`Missing level="debug" in log file using --debug:\n%s`, string(content))
if strings.Contains(string(content), `level=debug`) {
c.Fatalf(`Should not 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(`Missing 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 not have level="debug" in log file when using both --debug and --log-level=fatal:\n%s`, string(content))
}
}