浏览代码

Merge pull request #19893 from cpuguy83/19890_debugs_for_all

handle debug mode for clients
David Calavera 9 年之前
父节点
当前提交
1734571539
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      docker/client.go

+ 5 - 0
docker/client.go

@@ -6,6 +6,7 @@ import (
 	"github.com/docker/docker/cli"
 	"github.com/docker/docker/cliconfig"
 	flag "github.com/docker/docker/pkg/mflag"
+	"github.com/docker/docker/utils"
 )
 
 var clientFlags = &cli.ClientFlags{FlagSet: new(flag.FlagSet), Common: commonFlags}
@@ -24,5 +25,9 @@ func init() {
 		if clientFlags.Common.TrustKey == "" {
 			clientFlags.Common.TrustKey = filepath.Join(cliconfig.ConfigDir(), defaultTrustKeyFile)
 		}
+
+		if clientFlags.Common.Debug {
+			utils.EnableDebug()
+		}
 	}
 }