Skip to content

Commit

Permalink
add link between -D and --log-level=debug back in
Browse files Browse the repository at this point in the history
Due to popular demand :-)
See moby#11965

Signed-off-by: Doug Davis <[email protected]>
  • Loading branch information
Doug Davis committed May 14, 2015
1 parent ac81cd1 commit a85ca8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func main() {

if *flDebug {
os.Setenv("DEBUG", "1")
setLogLevel(logrus.DebugLevel)
}

if len(flHosts) == 0 {
Expand Down
12 changes: 6 additions & 6 deletions integration-cli/docker_cli_daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand All @@ -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))
}
}

Expand All @@ -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))
}
}

Expand Down

0 comments on commit a85ca8b

Please sign in to comment.