refactor(logging): clean up oauth logs and debugs

This commit is contained in:
hkfires
2026-01-09 11:20:55 +08:00
parent ef6bafbf7e
commit ee62ef4745
4 changed files with 7 additions and 21 deletions

View File

@@ -1609,7 +1609,6 @@ func formatOauthIdentity(auth *Auth, provider string, accountInfo string) string
if auth == nil {
return ""
}
authIndex := auth.EnsureIndex()
// Prefer the auth's provider when available.
providerName := strings.TrimSpace(auth.Provider)
if providerName == "" {
@@ -1631,16 +1630,10 @@ func formatOauthIdentity(auth *Auth, provider string, accountInfo string) string
if authFile != "" {
parts = append(parts, "auth_file="+authFile)
}
if authIndex != "" {
parts = append(parts, "auth_index="+authIndex)
}
if len(parts) == 0 {
return accountInfo
}
if accountInfo == "" {
return strings.Join(parts, " ")
}
return strings.Join(parts, " ") + " account=" + strconv.Quote(accountInfo)
return strings.Join(parts, " ")
}
// InjectCredentials delegates per-provider HTTP request preparation when supported.