aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-09-25 22:45:22 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-09-26 23:49:38 +0200
commit7459c00588580ae30d4891e8a22213150eb69ca1 (patch)
tree5cef08aaa690ab87048a81daed6838400ffe4fd5
parent00e284b921a3803b23fd10a74188c40e45e1f39a (diff)
downloadsonarqube-7459c00588580ae30d4891e8a22213150eb69ca1.tar.gz
sonarqube-7459c00588580ae30d4891e8a22213150eb69ca1.zip
SONAR-9802 add section "CE Logging" to standalone mode of api/system/info
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java2
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java4
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/WebSystemInfoModule.java1
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java6
6 files changed, 5 insertions, 12 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
index 2811aa16c44..f1776dd8c78 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
@@ -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);
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
index 3cf5f769c7f..9d777bc0e7d 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
@@ -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);
}
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
index c10b6f94c6d..9f4b1ac07e1 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
@@ -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
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java
index 799fcbb4023..90f8b838bd6 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java
@@ -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();
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/WebSystemInfoModule.java b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/WebSystemInfoModule.java
index 9335402242a..a8eb7a8a5dc 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/WebSystemInfoModule.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/WebSystemInfoModule.java
@@ -46,6 +46,7 @@ public class WebSystemInfoModule {
DbConnectionSection.class,
EsStateSection.class,
EsIndexesSection.class,
+ LoggingSection.class,
PluginsSection.class,
SettingsSection.class,
StandaloneSystemSection.class,
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java
index 33fdb132a4c..50730c7a928 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java
@@ -124,12 +124,6 @@ public class StandaloneSystemSectionTest {
}
@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);
when(realm.getName()).thenReturn("LDAP");