Do not create two loggers for DeprecationLogger backport(#58435) (#61530)

DeprecationLogger's constructor should not create two loggers. It was
taking parent logger instance, changing its name with a .deprecation
prefix and creating a new logger.
Most of the time parent logger was not needed. It was causing Log4j to
unnecessarily cache the unused parent logger instance.

depends on #61515
backports #58435
This commit is contained in:
Przemyslaw Gomulka 2020-08-26 16:04:02 +02:00 committed by GitHub
parent 3a8cfdc1f5
commit 9f566644af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
162 changed files with 199 additions and 420 deletions

View file

@ -77,7 +77,7 @@ final class Ec2ClientSettings {
private static final Logger logger = LogManager.getLogger(Ec2ClientSettings.class);
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger);
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(Ec2ClientSettings.class);
/** Credentials to authenticate with ec2. */
final AWSCredentials credentials;