Skip to content

Commit

Permalink
Merge pull request #861 from rabbitmq/log-level
Browse files Browse the repository at this point in the history
Decrease log volume by making use of debug level
  • Loading branch information
ansd authored Oct 4, 2021
2 parents 4f89ad8 + 3b6949f commit 0d46696
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion controllers/reconcile_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (r *RabbitmqClusterReconciler) runRabbitmqCLICommandsIfAnnotated(ctx contex
return 0, err
}
if !allReplicasReadyAndUpdated(sts) {
logger.Info("not all replicas ready yet; requeuing request to run RabbitMQ CLI commands")
logger.V(1).Info("not all replicas ready yet; requeuing request to run RabbitMQ CLI commands")
return 15 * time.Second, nil
}
// Retrieve the plugins config map, if it exists.
Expand Down
4 changes: 2 additions & 2 deletions controllers/reconcile_tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (r *RabbitmqClusterReconciler) reconcileTLS(ctx context.Context, rabbitmqCl
func (r *RabbitmqClusterReconciler) checkTLSSecrets(ctx context.Context, rabbitmqCluster *rabbitmqv1beta1.RabbitmqCluster) error {
logger := ctrl.LoggerFrom(ctx)
secretName := rabbitmqCluster.Spec.TLS.SecretName
logger.Info("TLS enabled, looking for secret", "secret", secretName)
logger.V(1).Info("TLS enabled, looking for secret", "secret", secretName)

// check if secret exists
secret := &corev1.Secret{}
Expand All @@ -57,7 +57,7 @@ func (r *RabbitmqClusterReconciler) checkTLSSecrets(ctx context.Context, rabbitm
if rabbitmqCluster.MutualTLSEnabled() {
if !rabbitmqCluster.SingleTLSSecret() {
secretName := rabbitmqCluster.Spec.TLS.CaSecretName
logger.Info("mutual TLS enabled, looking for CA certificate secret", "secret", secretName)
logger.V(1).Info("mutual TLS enabled, looking for CA certificate secret", "secret", secretName)

// check if secret exists
secret = &corev1.Secret{}
Expand Down
2 changes: 1 addition & 1 deletion internal/scaling/scaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func retryWithInterval(logger logr.Logger, msg string, retry int, interval time.
return
}
time.Sleep(interval)
logger.Info("retrying again", "action", msg, "interval", interval, "attempt", i+1)
logger.V(1).Info("retrying again", "action", msg, "interval", interval, "attempt", i+1)
}
return fmt.Errorf("failed to %s after %d retries", msg, retry)
}

0 comments on commit 0d46696

Please sign in to comment.