Skip to content

Commit

Permalink
update logger
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumEnigmaa committed Jun 4, 2024
1 parent 63e5a39 commit 4b9ffa0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/controller/cluster_monitoring_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ func (r *ClusterMonitoringReconciler) Reconcile(ctx context.Context, req ctrl.Re

// Linting is disabled for the 2 following lines as otherwise it fails with the following error:
// "should not use built-in type string as key for value"
ctx = context.WithValue(ctx, "cluster", cluster.Name) // nolint
ctx = context.WithValue(ctx, "installation", r.ManagementCluster.Name) // nolint
logger := log.FromContext(ctx)
logger := log.FromContext(ctx).WithValues("cluster", cluster.Name).WithValues("installation", r.ManagementCluster.Name) // nolint
ctx = log.IntoContext(ctx, logger)

if !r.MonitoringEnabled {
logger.Info("Monitoring is disabled at the installation level")
Expand Down

0 comments on commit 4b9ffa0

Please sign in to comment.