Skip to content

Commit

Permalink
Convert lib/auth/rotate to use slog (#50522)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosstimothy authored Dec 21, 2024
1 parent 3cd1d08 commit 8d11de6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/auth/rotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,14 @@ func (a *Server) RotateCertAuthority(ctx context.Context, req types.RotateReques
rotation := rotated.GetRotation()
switch rotation.State {
case types.RotationStateInProgress:
log.WithFields(logrus.Fields{"type": req.Type}).Infof("Updated rotation state, set current phase to: %q.", rotation.Phase)
a.logger.InfoContext(ctx, "Updated rotation state",
"current_phase", rotation.Phase,
"ca_type", req.Type,
)
case types.RotationStateStandby:
log.WithFields(logrus.Fields{"type": req.Type}).Infof("Updated and completed rotation.")
a.logger.InfoContext(ctx, "Updated and completed rotation",
"ca_type", req.Type,
)
}

return nil
Expand Down

0 comments on commit 8d11de6

Please sign in to comment.