Always use deprecateAndMaybeLog for deprecation warnings (#55319)

Backport of #55115.

Replace calls to deprecate(String,Object...) with deprecateAndMaybeLog(...),
with an appropriate key, so that all messages can potentially be deduplicated.
This commit is contained in:
Rory Hunter 2020-04-23 09:20:54 +01:00 committed by GitHub
parent 87f4751eca
commit d66af46724
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 194 additions and 160 deletions

View file

@ -135,11 +135,13 @@ final class Ec2ClientSettings {
return null;
} else {
if (key.length() == 0) {
deprecationLogger.deprecated("Setting [{}] is set but [{}] is not, which will be unsupported in future",
deprecationLogger.deprecatedAndMaybeLog("ec2_invalid_settings",
"Setting [{}] is set but [{}] is not, which will be unsupported in future",
SECRET_KEY_SETTING.getKey(), ACCESS_KEY_SETTING.getKey());
}
if (secret.length() == 0) {
deprecationLogger.deprecated("Setting [{}] is set but [{}] is not, which will be unsupported in future",
deprecationLogger.deprecatedAndMaybeLog("ec2_invalid_settings",
"Setting [{}] is set but [{}] is not, which will be unsupported in future",
ACCESS_KEY_SETTING.getKey(), SECRET_KEY_SETTING.getKey());
}