Browse code

add link between -D and --log-level=debug back in

Due to popular demand :-)
See #11965

Signed-off-by: Doug Davis <dug@us.ibm.com>

Doug Davis authored on 2015/05/15 02:07:21
Showing 2 changed files
... ...
@@ -56,6 +56,7 @@ func main() {
56 56
 
57 57
 	if *flDebug {
58 58
 		os.Setenv("DEBUG", "1")
59
+		setLogLevel(logrus.DebugLevel)
59 60
 	}
60 61
 
61 62
 	if len(flHosts) == 0 {
... ...
@@ -232,8 +232,8 @@ func (s *DockerDaemonSuite) TestDaemonFlagD(c *check.C) {
232 232
 		c.Fatal(err)
233 233
 	}
234 234
 	content, _ := ioutil.ReadFile(s.d.logFile.Name())
235
-	if strings.Contains(string(content), `level=debug`) {
236
-		c.Fatalf(`Should not have level="debug" in log file using -D:\n%s`, string(content))
235
+	if !strings.Contains(string(content), `level=debug`) {
236
+		c.Fatalf(`Should have level="debug" in log file using -D:\n%s`, string(content))
237 237
 	}
238 238
 }
239 239
 
... ...
@@ -242,8 +242,8 @@ func (s *DockerDaemonSuite) TestDaemonFlagDebug(c *check.C) {
242 242
 		c.Fatal(err)
243 243
 	}
244 244
 	content, _ := ioutil.ReadFile(s.d.logFile.Name())
245
-	if strings.Contains(string(content), `level=debug`) {
246
-		c.Fatalf(`Should not have level="debug" in log file using --debug:\n%s`, string(content))
245
+	if !strings.Contains(string(content), `level=debug`) {
246
+		c.Fatalf(`Should have level="debug" in log file using --debug:\n%s`, string(content))
247 247
 	}
248 248
 }
249 249
 
... ...
@@ -252,8 +252,8 @@ func (s *DockerDaemonSuite) TestDaemonFlagDebugLogLevelFatal(c *check.C) {
252 252
 		c.Fatal(err)
253 253
 	}
254 254
 	content, _ := ioutil.ReadFile(s.d.logFile.Name())
255
-	if strings.Contains(string(content), `level=debug`) {
256
-		c.Fatalf(`Should not have level="debug" in log file when using both --debug and --log-level=fatal:\n%s`, string(content))
255
+	if !strings.Contains(string(content), `level=debug`) {
256
+		c.Fatalf(`Should have level="debug" in log file when using both --debug and --log-level=fatal:\n%s`, string(content))
257 257
 	}
258 258
 }
259 259