Skip to content

Commit

Permalink
Improve logging (#10069)
Browse files Browse the repository at this point in the history
The default is "" which is not clearly seen in the log. This makes it
better.

Change-Id: Idc8fc192c69d30ea93ad1cc05a68738028f89506
  • Loading branch information
vagababov authored Nov 9, 2020
1 parent 427d401 commit f4c7907
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/reconciler/autoscaling/kpa/scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ func (ks *scaler) scale(ctx context.Context, pa *pav1alpha1.PodAutoscaler, sks *

min, max := pa.ScaleBounds(asConfig)
initialScale := kparesources.GetInitialScale(asConfig, pa)
logger.Debugf("MinScale = %d, MaxScale = %d, InitialScale = %d, DesiredScale = %d Reachable = %v",
// Log reachability as quoted string, since default value is "".
logger.Debugf("MinScale = %d, MaxScale = %d, InitialScale = %d, DesiredScale = %d Reachable = %q",
min, max, initialScale, desiredScale, pa.Spec.Reachability)
// If initial scale has been attained, ignore the initialScale altogether.
if initialScale > 1 && !pa.Status.IsScaleTargetInitialized() {
Expand Down

0 comments on commit f4c7907

Please sign in to comment.