diff options
author | Jacek <jacek.poreda@sonarsource.com> | 2021-02-12 17:45:12 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-02-12 20:07:13 +0000 |
commit | 9276e6c54b7c84d2db4571a930bf8141598e2e8c (patch) | |
tree | d650f44a49a14bc43d24c8e0bad846e14c430540 /server/sonar-main | |
parent | 70cd3fb194cb5d5d966a368ea3b7cda30253b6d8 (diff) | |
download | sonarqube-9276e6c54b7c84d2db4571a930bf8141598e2e8c.tar.gz sonarqube-9276e6c54b7c84d2db4571a930bf8141598e2e8c.zip |
SONAR-14455 Turn-off Elasticsearch 7.10.2 deprecation logging
Diffstat (limited to 'server/sonar-main')
-rw-r--r-- | server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java | 4 | ||||
-rw-r--r-- | server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java b/server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java index 1b0902a6a70..47c8a675a99 100644 --- a/server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java +++ b/server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java @@ -47,6 +47,10 @@ public class EsLogging { log4JPropertiesBuilder.apply( LogLevelConfig.newBuilder(log4JPropertiesBuilder.getRootLoggerName()) .rootLevelFor(ProcessId.ELASTICSEARCH) + // turn off ES type deprecation logging to not flood logs + .immutableLevel("DEPRECATION", Level.ERROR) + .immutableLevel("org.elasticsearch.deprecation", Level.ERROR) + .immutableLevel("org.elasticsearch.client.RestClient", Level.ERROR) .build()); return log4JPropertiesBuilder.get(); diff --git a/server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java b/server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java index 6d92faf980e..f62d65b3766 100644 --- a/server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java +++ b/server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java @@ -35,7 +35,7 @@ public class EsLoggingTest { @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); - private EsLogging underTest = new EsLogging(); + private final EsLogging underTest = new EsLogging(); @Test public void createProperties_with_empty_props() throws IOException { @@ -64,7 +64,16 @@ public class EsLoggingTest { "appender.file_es.strategy.action.condition.nested_condition.type", "IfAccumulatedFileCount", "appender.file_es.strategy.action.condition.nested_condition.exceeds", "7", "rootLogger.level", "INFO", - "rootLogger.appenderRef.file_es.ref", "file_es"); + "rootLogger.appenderRef.file_es.ref", "file_es", + "loggers", "DEPRECATION,org.elasticsearch.client.RestClient,org.elasticsearch.deprecation", + "logger.org.elasticsearch.client.RestClient.name", "org.elasticsearch.client.RestClient", + "logger.org.elasticsearch.deprecation.level", "ERROR", + "logger.org.elasticsearch.deprecation.name", "org.elasticsearch.deprecation", + "logger.DEPRECATION.level", "ERROR", + "logger.DEPRECATION.name", "DEPRECATION", + "logger.org.elasticsearch.client.RestClient.level", "ERROR" + + ); } @Test |