Browse code

Merge pull request #27276 from yuexiao-wang/func-name

Modify function name from SetDaemonLogLevel to SetLogLevel

Tõnis Tiigi authored on 2016/10/14 04:10:59
Showing 3 changed files
... ...
@@ -101,9 +101,8 @@ func (commonOpts *CommonOptions) SetDefaultOptions(flags *pflag.FlagSet) {
101 101
 	}
102 102
 }
103 103
 
104
-// SetDaemonLogLevel sets the logrus logging level
105
-// TODO: this is a bad name, it applies to the client as well.
106
-func SetDaemonLogLevel(logLevel string) {
104
+// SetLogLevel sets the logrus logging level
105
+func SetLogLevel(logLevel string) {
107 106
 	if logLevel != "" {
108 107
 		lvl, err := logrus.ParseLevel(logLevel)
109 108
 		if err != nil {
... ...
@@ -99,7 +99,7 @@ func showVersion() {
99 99
 }
100 100
 
101 101
 func dockerPreRun(opts *cliflags.ClientOptions) {
102
-	cliflags.SetDaemonLogLevel(opts.Common.LogLevel)
102
+	cliflags.SetLogLevel(opts.Common.LogLevel)
103 103
 
104 104
 	if opts.ConfigDir != "" {
105 105
 		cliconfig.SetConfigDir(opts.ConfigDir)
... ...
@@ -397,7 +397,7 @@ func loadDaemonCliConfig(opts daemonOptions) (*daemon.Config, error) {
397 397
 	}
398 398
 
399 399
 	// ensure that the log level is the one set after merging configurations
400
-	cliflags.SetDaemonLogLevel(config.LogLevel)
400
+	cliflags.SetLogLevel(config.LogLevel)
401 401
 
402 402
 	return config, nil
403 403
 }