mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Refactoring for logrus formatting
Use module name logrus instead of log. Use logrus.[Error|Warn|Debug|Fatal|Panic|Info]f instead of w/o f Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
This commit is contained in:
		
							parent
							
								
									ba6adc5f46
								
							
						
					
					
						commit
						6a1183b3ae
					
				
					 5 changed files with 13 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -6,7 +6,7 @@ import (
 | 
			
		|||
	"strings"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	log "github.com/Sirupsen/logrus"
 | 
			
		||||
	"github.com/Sirupsen/logrus"
 | 
			
		||||
	"github.com/docker/docker/pkg/discovery"
 | 
			
		||||
	"github.com/docker/go-connections/tlsconfig"
 | 
			
		||||
	"github.com/docker/libkv"
 | 
			
		||||
| 
						 | 
				
			
			@ -73,7 +73,7 @@ func (s *Discovery) Initialize(uris string, heartbeat time.Duration, ttl time.Du
 | 
			
		|||
 | 
			
		||||
	var config *store.Config
 | 
			
		||||
	if clusterOpts["kv.cacertfile"] != "" && clusterOpts["kv.certfile"] != "" && clusterOpts["kv.keyfile"] != "" {
 | 
			
		||||
		log.Info("Initializing discovery with TLS")
 | 
			
		||||
		logrus.Infof("Initializing discovery with TLS")
 | 
			
		||||
		tlsConfig, err := tlsconfig.Client(tlsconfig.Options{
 | 
			
		||||
			CAFile:   clusterOpts["kv.cacertfile"],
 | 
			
		||||
			CertFile: clusterOpts["kv.certfile"],
 | 
			
		||||
| 
						 | 
				
			
			@ -93,7 +93,7 @@ func (s *Discovery) Initialize(uris string, heartbeat time.Duration, ttl time.Du
 | 
			
		|||
			TLS: tlsConfig,
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		log.Info("Initializing discovery without TLS")
 | 
			
		||||
		logrus.Infof("Initializing discovery without TLS")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Creates a new store, will ignore options given
 | 
			
		||||
| 
						 | 
				
			
			@ -112,7 +112,7 @@ func (s *Discovery) watchOnce(stopCh <-chan struct{}, watchCh <-chan []*store.KV
 | 
			
		|||
				return true
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			log.WithField("discovery", s.backend).Debugf("Watch triggered with %d nodes", len(pairs))
 | 
			
		||||
			logrus.WithField("discovery", s.backend).Debugf("Watch triggered with %d nodes", len(pairs))
 | 
			
		||||
 | 
			
		||||
			// Convert `KVPair` into `discovery.Entry`.
 | 
			
		||||
			addrs := make([]string, len(pairs))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue