Skip to content

Commit cce0244

Browse files
committed
debug log user_ids
1 parent 55a0fd0 commit cce0244

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

enterprise/cli/dbcrypt_rotate.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (*RootCmd) dbcryptRotate() *clibase.Cmd {
108108
UserID: usr.ID,
109109
LoginType: usr.LoginType,
110110
}); err != nil {
111-
return xerrors.Errorf("update user link: %w", err)
111+
return xerrors.Errorf("update user link user_id=%s linked_id=%s: %w", userLink.UserID, userLink.LinkedID, err)
112112
}
113113
}
114114
gitAuthLinks, err := tx.GetGitAuthLinksByUserID(ctx, usr.ID)
@@ -124,7 +124,7 @@ func (*RootCmd) dbcryptRotate() *clibase.Cmd {
124124
OAuthRefreshToken: gitAuthLink.OAuthRefreshToken,
125125
OAuthExpiry: gitAuthLink.OAuthExpiry,
126126
}); err != nil {
127-
return xerrors.Errorf("update git auth link: %w", err)
127+
return xerrors.Errorf("update git auth link user_id=%s provider_id=%s: %w", gitAuthLink.UserID, gitAuthLink.ProviderID, err)
128128
}
129129
}
130130
return nil
@@ -134,7 +134,7 @@ func (*RootCmd) dbcryptRotate() *clibase.Cmd {
134134
if err != nil {
135135
return xerrors.Errorf("update user links: %w", err)
136136
}
137-
logger.Debug(ctx, "encrypted user tokens", slog.F("current", idx+1), slog.F("cipher", ciphers[0].HexDigest()))
137+
logger.Debug(ctx, "encrypted user tokens", slog.F("user_id", usr.ID), slog.F("current", idx+1), slog.F("cipher", ciphers[0].HexDigest()))
138138
}
139139
logger.Info(ctx, "operation completed successfully")
140140

0 commit comments

Comments
 (0)