mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Merge pull request #27276 from yuexiao-wang/func-name
Modify function name from SetDaemonLogLevel to SetLogLevel
This commit is contained in:
		
						commit
						62503f245f
					
				
					 3 changed files with 4 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -397,7 +397,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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue