]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9802 add section "CE Logging" to standalone mode of api/system/info
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 25 Sep 2017 20:45:22 +0000 (22:45 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 26 Sep 2017 21:49:38 +0000 (23:49 +0200)
server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java
server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/WebSystemInfoModule.java
server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java

index 2811aa16c44e5f0b5d89deff39b2c39de8b27382..f1776dd8c7805c36969c18ad2784e8ebe00f4b92 100644 (file)
@@ -26,6 +26,7 @@ import org.sonar.ce.queue.InternalCeQueueImpl;
 import org.sonar.core.platform.Module;
 import org.sonar.process.systeminfo.JvmPropertiesSection;
 import org.sonar.process.systeminfo.JvmStateSection;
+import org.sonar.server.platform.monitoring.cluster.LoggingSection;
 
 public class CeQueueModule extends Module {
   @Override
@@ -39,6 +40,7 @@ public class CeQueueModule extends Module {
       CeTasksMBeanImpl.class,
       new JvmStateSection("Compute Engine JVM State"),
       new JvmPropertiesSection("Compute Engine JVM Properties"),
+      LoggingSection.class,
 
       // init queue state and queue processing
       CeQueueInitializer.class);
index 3cf5f769c7f10b519a3d0bb18135d5b5039f31a1..9d777bc0e7dce6afd5eb091f4008fa0b0a16a479 100644 (file)
@@ -127,7 +127,6 @@ import org.sonar.server.platform.WebServerImpl;
 import org.sonar.server.platform.db.migration.MigrationConfigurationModule;
 import org.sonar.server.platform.db.migration.version.DatabaseVersion;
 import org.sonar.server.platform.monitoring.DbSection;
-import org.sonar.server.platform.monitoring.cluster.LoggingSection;
 import org.sonar.server.platform.monitoring.cluster.ProcessInfoProvider;
 import org.sonar.server.plugins.InstalledPluginReferentialFactory;
 import org.sonar.server.plugins.ServerExtensionInstaller;
@@ -431,8 +430,7 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer {
 
         // system info
         DbSection.class,
-        ProcessInfoProvider.class,
-        LoggingSection.class);
+        ProcessInfoProvider.class);
     } else {
       container.add(StandaloneCeDistributedInformation.class);
     }
index c10b6f94c6d633b7a4861018de2b41c88852651f..9f4b1ac07e15875d6e27273f3ef1a4a8d86c065d 100644 (file)
@@ -131,7 +131,7 @@ public class ComputeEngineContainerImplTest {
         CONTAINER_ITSELF
           + 73 // level 4
           + 4 // content of CeConfigurationModule
-          + 6 // content of CeQueueModule
+          + 7 // content of CeQueueModule
           + 4 // content of CeHttpModule
           + 3 // content of CeTaskCommonsModule
           + 4 // content of ProjectAnalysisTaskModule
index 799fcbb4023ba7d29691827ce1d6ebdf6023dff3..90f8b838bd67befb2b73ac1bee79802de08bc02a 100644 (file)
@@ -129,8 +129,6 @@ public class StandaloneSystemSection extends BaseSectionMBean implements SystemS
     setAttribute(protobuf, "Home Dir", config.get(ProcessProperties.PATH_HOME).orElse(null));
     setAttribute(protobuf, "Data Dir", config.get(ProcessProperties.PATH_DATA).orElse(null));
     setAttribute(protobuf, "Temp Dir", config.get(ProcessProperties.PATH_TEMP).orElse(null));
-    setAttribute(protobuf, "Logs Dir", config.get(ProcessProperties.PATH_LOGS).orElse(null));
-    setAttribute(protobuf, "Logs Level", getLogLevel());
     setAttribute(protobuf, "Processors", Runtime.getRuntime().availableProcessors());
     return protobuf.build();
   }
index 9335402242a235694242a9dbe05614ceb174fd02..a8eb7a8a5dc615f04732e19d219127eec9de9d81 100644 (file)
@@ -46,6 +46,7 @@ public class WebSystemInfoModule {
       DbConnectionSection.class,
       EsStateSection.class,
       EsIndexesSection.class,
+      LoggingSection.class,
       PluginsSection.class,
       SettingsSection.class,
       StandaloneSystemSection.class,
index 33fdb132a4c1da9af39e900fa4979b0625a981f1..50730c7a92895bf5f8c2fc45232f27205f6eb736 100644 (file)
@@ -123,12 +123,6 @@ public class StandaloneSystemSectionTest {
     assertThatAttributeIs(protobuf, "Official Distribution", false);
   }
 
-  @Test
-  public void get_log_level() throws Exception {
-    ProtobufSystemInfo.Section protobuf = underTest.toProtobuf();
-    assertThatAttributeIs(protobuf, "Logs Level", "DEBUG");
-  }
-
   @Test
   public void get_realm() throws Exception {
     SecurityRealm realm = mock(SecurityRealm.class);