@@ -136,7 +136,7 @@ func (c *Client) FetchUserPermission(ctx context.Context, projectID uint64, user
136136 userPerm , resourceAccess , err = c .permCache .GetUserPermission (ctx , projectID , userID )
137137 if err != nil {
138138 // log the error, but don't stop
139- c .logger .With ("error " , err ).Error ("FetchUserPermission failed to query the permCache" )
139+ c .logger .With ("err " , err ).Error ("FetchUserPermission failed to query the permCache" )
140140 }
141141 }
142142
@@ -186,7 +186,7 @@ func (c *Client) SpendQuota(ctx context.Context, quota *proto.AccessQuota, compu
186186 }
187187 if event != nil {
188188 if _ , err := c .quotaClient .NotifyEvent (ctx , quota .AccessKey .ProjectID , event ); err != nil {
189- c .logger .With ("error " , err , "op" , "use_access_key" , "event" , event ).Error ("-> quota control: failed to notify" )
189+ c .logger .With ("err " , err , "op" , "use_access_key" , "event" , event ).Error ("-> quota control: failed to notify" )
190190 }
191191 }
192192 return true , nil
@@ -250,7 +250,7 @@ func (c *Client) Run(ctx context.Context) error {
250250 // Start the sync
251251 for range c .ticker .C {
252252 if err := c .usage .SyncUsage (ctx , c .quotaClient , & c .service ); err != nil {
253- c .logger .With ("error " , err , "op" , "run" ).Error ("-> quota control: failed to sync usage" )
253+ c .logger .With ("err " , err , "op" , "run" ).Error ("-> quota control: failed to sync usage" )
254254 continue
255255 }
256256 c .logger .With ("op" , "run" ).Info ("-> quota control: synced usage" )
@@ -269,7 +269,7 @@ func (c *Client) Stop(timeoutCtx context.Context) {
269269 c .ticker .Stop ()
270270 }
271271 if err := c .usage .SyncUsage (timeoutCtx , c .quotaClient , & c .service ); err != nil {
272- c .logger .With ("error " , err , "op" , "run" ).Error ("-> quota control: failed to sync usage" )
272+ c .logger .With ("err " , err , "op" , "run" ).Error ("-> quota control: failed to sync usage" )
273273 }
274274 c .logger .With ("op" , "stop" ).Info ("-> quota control: stopped." )
275275}
0 commit comments