Skip to content

Commit

Permalink
Reduce some unnecessary logging (#125)
Browse files Browse the repository at this point in the history
Some debug messages are being emitted that don't necessarily need to be in the production build of the agent.
  • Loading branch information
michaeljguarino authored Feb 19, 2024
1 parent baa99ad commit 6ab56ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/pipelinegates/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *GateReconciler) Poll(ctx context.Context) (done bool, err error) {
after = resp.PagedClusterGates.PageInfo.EndCursor

for _, gate := range resp.PagedClusterGates.Edges {
logger.Info("sending update for", "gate", gate.Node.ID)
logger.V(2).Info("sending update for", "gate", gate.Node.ID)
s.GateQueue.Add(gate.Node.ID)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/service/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (s *ServiceReconciler) Reconcile(ctx context.Context, id string) (result re
}
}()

logger.Info("local", "flag", Local)
logger.V(2).Info("local", "flag", Local)
if Local && svc.Name == OperatorService {
return
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/service/reconciler_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ func FormatActionGroupEvent(ctx context.Context, age event.ActionGroupEvent) err

switch age.Action {
case event.ApplyAction:
logger.Info("apply phase", "status", strings.ToLower(age.Status.String()))
logger.V(2).Info("apply phase", "status", strings.ToLower(age.Status.String()))
case event.PruneAction:
logger.Info("prune phase ", "status", strings.ToLower(age.Status.String()))
logger.V(2).Info("prune phase ", "status", strings.ToLower(age.Status.String()))
case event.DeleteAction:
logger.Info("delete phase", "status", strings.ToLower(age.Status.String()))
logger.V(2).Info("delete phase", "status", strings.ToLower(age.Status.String()))
case event.WaitAction:
logger.Info("reconcile phase", "status", strings.ToLower(age.Status.String()))
logger.V(2).Info("reconcile phase", "status", strings.ToLower(age.Status.String()))
case event.InventoryAction:
logger.Info("inventory update", "status", strings.ToLower(age.Status.String()))
logger.V(2).Info("inventory update", "status", strings.ToLower(age.Status.String()))
default:
return fmt.Errorf("invalid action group action: %+v", age)
}
Expand Down

0 comments on commit 6ab56ab

Please sign in to comment.