Skip to content

Commit

Permalink
Merge pull request #55 from ialidzhikov/fix/logger-args
Browse files Browse the repository at this point in the history
Fix number of arguments for logger calls
  • Loading branch information
rfranzke authored Mar 31, 2020
2 parents 280d268 + c606863 commit 57c28cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/validator/shoot_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Shoot struct {
func (v *Shoot) Handle(ctx context.Context, req admission.Request) admission.Response {
shoot := &core.Shoot{}
if err := util.Decode(v.decoder, req.Object.Raw, shoot); err != nil {
v.Logger.Error(err, "failed to decode shoot", string(req.Object.Raw))
v.Logger.Error(err, "failed to decode shoot", "shoot", string(req.Object.Raw))
return admission.Errored(http.StatusBadRequest, err)
}

Expand All @@ -58,7 +58,7 @@ func (v *Shoot) Handle(ctx context.Context, req admission.Request) admission.Res
case admissionv1beta1.Update:
oldShoot := &core.Shoot{}
if err := util.Decode(v.decoder, req.OldObject.Raw, oldShoot); err != nil {
v.Logger.Error(err, "failed to decode old shoot", string(req.OldObject.Raw))
v.Logger.Error(err, "failed to decode old shoot", "old shoot", string(req.OldObject.Raw))
return admission.Errored(http.StatusBadRequest, err)
}

Expand All @@ -67,7 +67,7 @@ func (v *Shoot) Handle(ctx context.Context, req admission.Request) admission.Res
return admission.Errored(http.StatusBadRequest, err)
}
default:
v.Logger.Info("Webhook not responsible", "Operation", req.Operation)
v.Logger.Info("Webhook not responsible", "operation", req.Operation)
}

return admission.Allowed("validations succeeded")
Expand Down

0 comments on commit 57c28cd

Please sign in to comment.