Browse code

Modify function name from SetDaemonLogLevel to SetLogLevel

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>

yuexiao-wang authored on 2016/10/11 20:35:12
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)
... ...
@@ -395,7 +395,7 @@ func loadDaemonCliConfig(opts daemonOptions) (*daemon.Config, error) {
395 395
 	}
396 396
 
397 397
 	// ensure that the log level is the one set after merging configurations
398
-	cliflags.SetDaemonLogLevel(config.LogLevel)
398
+	cliflags.SetLogLevel(config.LogLevel)
399 399
 
400 400
 	return config, nil
401 401
 }