Przeglądaj źródła

handle debug mode for clients

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Brian Goff 9 lat temu
rodzic
commit
78b0defcf3
1 zmienionych plików z 5 dodań i 0 usunięć
  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()
+		}
 	}
 }