Skip to content

Commit fe3ff54

Browse files
committed
Modify function name from SetDaemonLogLevel to SetLogLevel
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
1 parent 9a570f8 commit fe3ff54

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

cli/flags/common.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ func (commonOpts *CommonOptions) SetDefaultOptions(flags *pflag.FlagSet) {
101101
}
102102
}
103103

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) {
107106
if logLevel != "" {
108107
lvl, err := logrus.ParseLevel(logLevel)
109108
if err != nil {

cmd/docker/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func showVersion() {
9999
}
100100

101101
func dockerPreRun(opts *cliflags.ClientOptions) {
102-
cliflags.SetDaemonLogLevel(opts.Common.LogLevel)
102+
cliflags.SetLogLevel(opts.Common.LogLevel)
103103

104104
if opts.ConfigDir != "" {
105105
cliconfig.SetConfigDir(opts.ConfigDir)

cmd/dockerd/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ func loadDaemonCliConfig(opts daemonOptions) (*daemon.Config, error) {
395395
}
396396

397397
// ensure that the log level is the one set after merging configurations
398-
cliflags.SetDaemonLogLevel(config.LogLevel)
398+
cliflags.SetLogLevel(config.LogLevel)
399399

400400
return config, nil
401401
}

0 commit comments

Comments
 (0)