@@ -25,6 +25,7 @@ import (
2525 "path/filepath"
2626 "strings"
2727 "sync"
28+ "time"
2829
2930 "go.bytebuilders.dev/license-proxyserver/pkg/common"
3031 "go.bytebuilders.dev/license-proxyserver/pkg/storage"
@@ -169,8 +170,6 @@ func (r *LicenseAcquirer) reconcile(ctx context.Context, clusterName, cid string
169170}
170171
171172func (r * LicenseAcquirer ) getNewLicense (ctx context.Context , cid string , features []string ) (* v1alpha1.License , * v1alpha1.Contract , error ) {
172- logger := log .FromContext (ctx )
173-
174173 lc , err := pc .NewClient (r .BaseURL , r .Token , cid , r .CaCert , r .InsecureSkipTLSVerify , fmt .Sprintf ("license-proxyserver-manager/%s" , v .Version .Version ))
175174 if err != nil {
176175 return nil , nil , err
@@ -180,7 +179,6 @@ func (r *LicenseAcquirer) getNewLicense(ctx context.Context, cid string, feature
180179 if err != nil {
181180 return nil , nil , err
182181 }
183- logger .Info ("acquired new license" , "cid" , cid , "features" , strings .Join (features , "," ))
184182
185183 caData , err := info .LoadLicenseCA ()
186184 if err != nil {
@@ -200,5 +198,13 @@ func (r *LicenseAcquirer) getNewLicense(ctx context.Context, cid string, feature
200198 return nil , nil , err
201199 }
202200
201+ klog .InfoS ("acquired new license" ,
202+ "cluster" , cid ,
203+ "id" , l .ID ,
204+ "product" , l .ProductLine ,
205+ "plan" , l .PlanName ,
206+ "tier" , l .TierName ,
207+ "expiry" , l .NotAfter .UTC ().Format (time .RFC822 ),
208+ )
203209 return & l , con , nil
204210}
0 commit comments