start all the log messages with lowercase letters

This commit is contained in:
Murat Kabilov
2017-08-15 10:12:36 +02:00
parent 87a379f663
commit e26db66cb5
17 changed files with 100 additions and 100 deletions
+3 -3
View File
@@ -88,7 +88,7 @@ func (c *Controller) initOperatorConfig() {
configMapData = configMap.Data
} else {
c.logger.Infoln("No ConfigMap specified. Loading default values")
c.logger.Infoln("no ConfigMap specified. Loading default values")
}
if configMapData["namespace"] == "" { // Namespace in ConfigMap has priority over env var
@@ -108,7 +108,7 @@ func (c *Controller) initController() {
c.initClients()
c.initOperatorConfig()
c.logger.Infof("Config: %s", c.opConfig.MustMarshal())
c.logger.Infof("config: %s", c.opConfig.MustMarshal())
if c.opConfig.DebugLogging {
c.logger.Logger.Level = logrus.DebugLevel
@@ -185,7 +185,7 @@ func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) {
go c.processClusterEventsQueue(i, stopCh, wg)
}
c.logger.Info("Started working in background")
c.logger.Info("started working in background")
}
func (c *Controller) runPodInformer(stopCh <-chan struct{}, wg *sync.WaitGroup) {
+1 -1
View File
@@ -45,7 +45,7 @@ func (c *Controller) dispatchPodEvent(clusterName spec.NamespacedName, event spe
cluster, ok := c.clusters[clusterName]
c.clustersMu.RUnlock()
if ok {
c.logger.Debugf("Sending %q event of pod %q to the %q cluster channel", event.EventType, event.PodName, clusterName)
c.logger.Debugf("sending %q event of pod %q to the %q cluster channel", event.EventType, event.PodName, clusterName)
cluster.ReceivePodEvent(event)
}
}
+16 -16
View File
@@ -68,14 +68,14 @@ func (c *Controller) clusterListFunc(options metav1.ListOptions) (runtime.Object
}
if len(list.Items) > 0 {
if failedClustersCnt > 0 && activeClustersCnt == 0 {
c.logger.Infof("There are no clusters running. %d are in the failed state", failedClustersCnt)
c.logger.Infof("there are no clusters running. %d are in the failed state", failedClustersCnt)
} else if failedClustersCnt == 0 && activeClustersCnt > 0 {
c.logger.Infof("There are %d clusters running", activeClustersCnt)
c.logger.Infof("there are %d clusters running", activeClustersCnt)
} else {
c.logger.Infof("There are %d clusters running and %d are in the failed state", activeClustersCnt, failedClustersCnt)
c.logger.Infof("there are %d clusters running and %d are in the failed state", activeClustersCnt, failedClustersCnt)
}
} else {
c.logger.Infof("No clusters running")
c.logger.Infof("no clusters running")
}
atomic.StoreInt64(&c.lastClusterSyncTime, time.Now().Unix())
@@ -146,11 +146,11 @@ func (c *Controller) processEvent(obj interface{}) error {
switch event.EventType {
case spec.EventAdd:
if clusterFound {
logger.Debugf("Cluster %q already exists", clusterName)
logger.Debugf("cluster %q already exists", clusterName)
return nil
}
logger.Infof("Creation of the %q cluster started", clusterName)
logger.Infof("creation of the %q cluster started", clusterName)
stopCh := make(chan struct{})
cl = cluster.New(c.makeClusterConfig(), c.KubeClient, *event.NewSpec, logger)
@@ -168,12 +168,12 @@ func (c *Controller) processEvent(obj interface{}) error {
return nil
}
logger.Infof("Cluster %q has been created", clusterName)
logger.Infof("cluster %q has been created", clusterName)
case spec.EventUpdate:
logger.Infof("Update of the %q cluster started", clusterName)
logger.Infof("update of the %q cluster started", clusterName)
if !clusterFound {
logger.Warnf("Cluster %q does not exist", clusterName)
logger.Warnf("cluster %q does not exist", clusterName)
return nil
}
if err := cl.Update(event.NewSpec); err != nil {
@@ -183,11 +183,11 @@ func (c *Controller) processEvent(obj interface{}) error {
return nil
}
cl.Error = nil
logger.Infof("Cluster %q has been updated", clusterName)
logger.Infof("cluster %q has been updated", clusterName)
case spec.EventDelete:
logger.Infof("Deletion of the %q cluster started", clusterName)
logger.Infof("deletion of the %q cluster started", clusterName)
if !clusterFound {
logger.Errorf("Unknown cluster: %q", clusterName)
logger.Errorf("unknown cluster: %q", clusterName)
return nil
}
@@ -202,9 +202,9 @@ func (c *Controller) processEvent(obj interface{}) error {
delete(c.stopChs, clusterName)
c.clustersMu.Unlock()
logger.Infof("Cluster %q has been deleted", clusterName)
logger.Infof("cluster %q has been deleted", clusterName)
case spec.EventSync:
logger.Infof("Syncing of the %q cluster started", clusterName)
logger.Infof("syncing of the %q cluster started", clusterName)
// no race condition because a cluster is always processed by single worker
if !clusterFound {
@@ -225,7 +225,7 @@ func (c *Controller) processEvent(obj interface{}) error {
}
cl.Error = nil
logger.Infof("Cluster %q has been synced", clusterName)
logger.Infof("cluster %q has been synced", clusterName)
}
return nil
@@ -273,7 +273,7 @@ func (c *Controller) queueClusterEvent(old, new *spec.Postgresql, eventType spec
}
if clusterError != nil && eventType != spec.EventDelete {
c.logger.Debugf("Skipping %q event for invalid cluster %q (reason: %v)", eventType, clusterName, clusterError)
c.logger.Debugf("skipping %q event for invalid cluster %q (reason: %v)", eventType, clusterName, clusterError)
return
}
+4 -4
View File
@@ -53,9 +53,9 @@ func (c *Controller) createTPR() error {
if !k8sutil.ResourceAlreadyExists(err) {
return err
}
c.logger.Infof("ThirdPartyResource %q is already registered", constants.TPRName)
c.logger.Infof("thirdPartyResource %q is already registered", constants.TPRName)
} else {
c.logger.Infof("ThirdPartyResource %q' has been registered", constants.TPRName)
c.logger.Infof("thirdPartyResource %q' has been registered", constants.TPRName)
}
return k8sutil.WaitTPRReady(c.RestClient, c.opConfig.TPR.ReadyWaitInterval, c.opConfig.TPR.ReadyWaitTimeout, c.opConfig.Namespace)
@@ -71,7 +71,7 @@ func (c *Controller) getInfrastructureRoles(rolesSecret *spec.NamespacedName) (r
Secrets(rolesSecret.Namespace).
Get(rolesSecret.Name, metav1.GetOptions{})
if err != nil {
c.logger.Debugf("Infrastructure roles secret name: %q", *rolesSecret)
c.logger.Debugf("infrastructure roles secret name: %q", *rolesSecret)
return nil, fmt.Errorf("could not get infrastructure roles secret: %v", err)
}
@@ -99,7 +99,7 @@ Users:
case "inrole":
t.MemberOf = append(t.MemberOf, s)
default:
c.logger.Warnf("Unknown key %q", p)
c.logger.Warnf("unknown key %q", p)
}
}
}