Skip to content

Commit

Permalink
Refactor logging
Browse files Browse the repository at this point in the history
Signed-off-by: Tsuyoshi Ushio <[email protected]>
  • Loading branch information
TsuyoshiUshio committed Sep 8, 2021
1 parent c37ea23 commit cddf760
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/scaling/scaledjob/scale_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,8 @@ func getScalersMetrics(ctx context.Context, scalers []scalers.Scaler, scaledJob
continue
}

scalerLogger.Info("Active trigger", "isTriggerActive", isTriggerActive)

targetAverageValue = getTargetAverageValue(metricSpecs)

scalerLogger.Info("Scaler targetAverageValue", "targetAverageValue", targetAverageValue)

metrics, err := scaler.GetMetrics(ctx, "queueLength", nil)
if err != nil {
scalerLogger.V(1).Info("Error getting scaler metrics, but continue", "Error", err)
Expand All @@ -128,7 +124,7 @@ func getScalersMetrics(ctx context.Context, scalers []scalers.Scaler, scaledJob
queueLength += metricValue
}
}
scalerLogger.Info("QueueLength Metric value", "queueLength", queueLength)
scalerLogger.Info("Scaler Metric value", "isTriggerActive", isTriggerActive, "queueLength", queueLength, "targetAverageValue", targetAverageValue)

scaler.Close()

Expand Down

0 comments on commit cddf760

Please sign in to comment.