Skip to content

Commit e0ef8bb

Browse files
committed
Fix some logging issues.
1 parent a7af80d commit e0ef8bb

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

pkg/apis/mysql/v1alpha1/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (c *MysqlCluster) UpdateStatusCondition(condType ClusterConditionType,
4747
if i, exist := c.condExists(condType); exist {
4848
cond := c.Status.Conditions[i]
4949
if cond.Status != newCondition.Status {
50-
glog.V(4).Infof("Found status change for mysql cluster "+
50+
glog.V(3).Infof("Found status change for mysql cluster "+
5151
"%q condition %q: %q -> %q; setting lastTransitionTime to %v",
5252
c.Name, condType, cond.Status, status, t)
5353
newCondition.LastTransitionTime = metav1.NewTime(t)

pkg/controller/clustercontroller/backups.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ type job struct {
5151
}
5252

5353
func (c *Controller) registerClusterInBackupCron(cluster *api.MysqlCluster) error {
54-
glog.Infof("Register cluster into cronjob: %s, crontab: %s",
55-
cluster.Name, cluster.Spec.BackupSchedule)
56-
5754
if len(cluster.Spec.BackupSchedule) == 0 {
5855
return nil
5956
}
@@ -63,6 +60,9 @@ func (c *Controller) registerClusterInBackupCron(cluster *api.MysqlCluster) erro
6360
return fmt.Errorf("failed to parse schedule: %s", err)
6461
}
6562

63+
glog.V(2).Infof("Register cluster into cronjob: %s, crontab: %s",
64+
cluster.Name, cluster.Spec.BackupSchedule)
65+
6666
lockJobRegister.Lock()
6767
defer lockJobRegister.Unlock()
6868

pkg/controller/clustercontroller/controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func (c *Controller) workerRecouncile(stopCh <-chan struct{}) {
264264
if err != nil {
265265
if k8errors.IsNotFound(err) {
266266
// key was removed from map, don't reconcile.
267-
glog.Infof("Removing issuer %q from reconcile queue", key)
267+
glog.Infof("Cluster %q is not found!", key)
268268
return nil
269269
}
270270
return fmt.Errorf("failed to get cluster: %s", err)

pkg/controller/clustercontroller/reconcile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (c *Controller) Reconcile(ctx context.Context, cluster *api.MysqlCluster) e
3838
// ensure that cluster will be reconciled
3939
defer c.addClusterInReconcileQueue(cluster, reconcileTime)
4040

41-
glog.V(1).Infof("reconcile cluster: %s", cluster.Name)
41+
glog.V(1).Infof("Reconciling cluster: %s", cluster.Name)
4242
copyCluster := cluster.DeepCopy()
4343
opt := options.GetOptions()
4444

pkg/controller/clustercontroller/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333

3434
// Sync for add and update.
3535
func (c *Controller) Sync(ctx context.Context, cluster *api.MysqlCluster) error {
36-
glog.Infof("sync cluster: %s", cluster.Name)
36+
glog.Infof("Syncing cluster: %s", cluster.Name)
3737
copyCluster := cluster.DeepCopy()
3838
opt := options.GetOptions()
3939

0 commit comments

Comments
 (0)