@@ -76,7 +76,7 @@ func (lb *processorLoadBalancer) LoadBalance(ctx context.Context, partitionIDs [
7676 // - I have too many. We expect to have some stolen from us, but we'll maintain
7777 // ownership for now.
7878 claimMorePartitions = false
79- log .Writef (EventConsumer , "[%0.5s ] Owns %d/%d, no more needed" , lb .details .ClientID , len (lbinfo .current ), lbinfo .maxAllowed )
79+ log .Writef (EventConsumer , "[%s ] Owns %d/%d, no more needed" , lb .details .ClientID , len (lbinfo .current ), lbinfo .maxAllowed )
8080 } else if lbinfo .extraPartitionPossible && len (lbinfo .current ) == lbinfo .maxAllowed - 1 {
8181 // In the 'extraPartitionPossible' scenario, some consumers will have an extra partition
8282 // since things don't divide up evenly. We're one under the max, which means we _might_
@@ -85,7 +85,7 @@ func (lb *processorLoadBalancer) LoadBalance(ctx context.Context, partitionIDs [
8585 // We will attempt to grab _one_ more but only if there are free partitions available
8686 // or if one of the consumers has more than the max allowed.
8787 claimMorePartitions = len (lbinfo .unownedOrExpired ) > 0 || len (lbinfo .aboveMax ) > 0
88- log .Writef (EventConsumer , "[%0.5s ] Unowned/expired: %d, above max: %d, need to claim: %t" ,
88+ log .Writef (EventConsumer , "[%s ] Unowned/expired: %d, above max: %d, need to claim: %t" ,
8989 lb .details .ClientID ,
9090 len (lbinfo .unownedOrExpired ),
9191 len (lbinfo .aboveMax ),
@@ -97,17 +97,17 @@ func (lb *processorLoadBalancer) LoadBalance(ctx context.Context, partitionIDs [
9797 if claimMorePartitions {
9898 switch lb .strategy {
9999 case ProcessorStrategyGreedy :
100- log .Writef (EventConsumer , "[%0.5s ] Using greedy strategy to claim partitions" , lb .details .ClientID )
100+ log .Writef (EventConsumer , "[%s ] Using greedy strategy to claim partitions" , lb .details .ClientID )
101101 ownerships = lb .greedyLoadBalancer (ctx , lbinfo )
102102 case ProcessorStrategyBalanced :
103- log .Writef (EventConsumer , "[%0.5s ] Using balanced strategy to claim partitions" , lb .details .ClientID )
103+ log .Writef (EventConsumer , "[%s ] Using balanced strategy to claim partitions" , lb .details .ClientID )
104104 o := lb .balancedLoadBalancer (ctx , lbinfo )
105105
106106 if o != nil {
107107 ownerships = append (lbinfo .current , * o )
108108 }
109109 default :
110- return nil , fmt .Errorf ("[%0.5s ] invalid load balancing strategy '%s'" , lb .details .ClientID , lb .strategy )
110+ return nil , fmt .Errorf ("[%s ] invalid load balancing strategy '%s'" , lb .details .ClientID , lb .strategy )
111111 }
112112 }
113113
@@ -118,7 +118,7 @@ func (lb *processorLoadBalancer) LoadBalance(ctx context.Context, partitionIDs [
118118 }
119119
120120 if log .Should (EventConsumer ) {
121- log .Writef (EventConsumer , "[%0.5s ] Asked for %s, got %s" , lb .details .ClientID , partitionsForOwnerships (ownerships ), partitionsForOwnerships (actual ))
121+ log .Writef (EventConsumer , "[%s ] Asked for %s, got %s" , lb .details .ClientID , partitionsForOwnerships (ownerships ), partitionsForOwnerships (actual ))
122122 }
123123
124124 return actual , nil
0 commit comments