Modify function name from SetDaemonLogLevel to SetLogLevel
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn> Upstream-commit: fe3ff54c7a87d475d5b2a799c5c85e6300c371db Component: engine
This commit is contained in:
@@ -101,9 +101,8 @@ func (commonOpts *CommonOptions) SetDefaultOptions(flags *pflag.FlagSet) {
|
||||
}
|
||||
}
|
||||
|
||||
// SetDaemonLogLevel sets the logrus logging level
|
||||
// TODO: this is a bad name, it applies to the client as well.
|
||||
func SetDaemonLogLevel(logLevel string) {
|
||||
// SetLogLevel sets the logrus logging level
|
||||
func SetLogLevel(logLevel string) {
|
||||
if logLevel != "" {
|
||||
lvl, err := logrus.ParseLevel(logLevel)
|
||||
if err != nil {
|
||||
|
||||
@@ -99,7 +99,7 @@ func showVersion() {
|
||||
}
|
||||
|
||||
func dockerPreRun(opts *cliflags.ClientOptions) {
|
||||
cliflags.SetDaemonLogLevel(opts.Common.LogLevel)
|
||||
cliflags.SetLogLevel(opts.Common.LogLevel)
|
||||
|
||||
if opts.ConfigDir != "" {
|
||||
cliconfig.SetConfigDir(opts.ConfigDir)
|
||||
|
||||
@@ -395,7 +395,7 @@ func loadDaemonCliConfig(opts daemonOptions) (*daemon.Config, error) {
|
||||
}
|
||||
|
||||
// ensure that the log level is the one set after merging configurations
|
||||
cliflags.SetDaemonLogLevel(config.LogLevel)
|
||||
cliflags.SetLogLevel(config.LogLevel)
|
||||
|
||||
return config, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user