]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17714 Enable deprecation logging for ES
authoralain <alain.kermis@sonarsource.com>
Wed, 8 Feb 2023 10:53:57 +0000 (11:53 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 9 Feb 2023 20:03:34 +0000 (20:03 +0000)
So far, there are no logs regarding deprecated features. However, we want to be notified in the logs should there be any deprecations in future ES releases.

server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java
server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java
server/sonar-server-common/src/main/java/org/sonar/server/log/ServerProcessLogging.java

index b24a26818be90bdfa07da2864af9e6a32645f20a..6a3fd6ec54e1c66ed6d9f7c2ed58f1703edf8b80 100644 (file)
@@ -56,10 +56,6 @@ public class EsLogging {
       .logLevelConfig(
         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())
       .build();
   }
index 330cfc00e6b7670fa80f0c63016c6043026f6373..6336e3112498da5fc530a8b60cfb0e15482619d8 100644 (file)
@@ -64,15 +64,7 @@ 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",
-      "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"
-
+      "rootLogger.appenderRef.file_es.ref", "file_es"
     );
   }
 
index 85ff4a68e2973c5b6866f784fe679557f479684e..93566010bfa5fb3ebea22e02aeb9c71dd575bcfd 100644 (file)
@@ -79,11 +79,6 @@ public abstract class ServerProcessLogging {
     builder.immutableLevel("org.elasticsearch.node", Level.INFO);
     builder.immutableLevel("org.elasticsearch.http", Level.INFO);
 
-    // turn off ES type deprecation logging to not flood logs
-    builder.immutableLevel("DEPRECATION", Level.ERROR);
-    builder.immutableLevel("org.elasticsearch.deprecation", Level.ERROR);
-    builder.immutableLevel("org.elasticsearch.client.RestClient", Level.ERROR);
-
     builder.immutableLevel("ch.qos.logback", Level.WARN);
     builder.immutableLevel("org.apache.catalina", Level.INFO);
     builder.immutableLevel("org.apache.coyote", Level.INFO);