aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application
diff options
context:
space:
mode:
authorssjenka <ssjenka@ops-slave-centos7-1.internal.sonarsource.com>2016-12-01 12:36:30 +0100
committerssjenka <ssjenka@ops-slave-centos7-1.internal.sonarsource.com>2016-12-01 12:36:30 +0100
commit9f7dd16ac6e024ad133099f4f3a34a14024275f1 (patch)
tree70c3e9038789d91a640da60f24ec69683236c245 /sonar-application
parent2f85add5bb0b75a13951c620877a8404318ff602 (diff)
parent11564671da764c89a6e2246974c45f3bbbd9a316 (diff)
downloadsonarqube-9f7dd16ac6e024ad133099f4f3a34a14024275f1.tar.gz
sonarqube-9f7dd16ac6e024ad133099f4f3a34a14024275f1.zip
Automatic merge from branch-6.2
* origin/branch-6.2: SONAR-8335 rename LogDomain#ES_CLIENT to LogDomain#ES SONAR-8335 add IT on dynamic log level change SONAR-8335 make changing root level change level of all loggers SONAR-8335 add missing coverage on jmx log property SONAR-8335 drop dead code ServerLogging#getCurrentLogFile SONAR-8335 move RootLoggerConfig out of LogbackHelper SONAR-8335 move LogBackHelper to subpackage logging
Diffstat (limited to 'sonar-application')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/AppLogging.java10
-rw-r--r--sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java2
2 files changed, 7 insertions, 5 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/AppLogging.java b/sonar-application/src/main/java/org/sonar/application/AppLogging.java
index 69ba954e4f1..284fef1466d 100644
--- a/sonar-application/src/main/java/org/sonar/application/AppLogging.java
+++ b/sonar-application/src/main/java/org/sonar/application/AppLogging.java
@@ -24,12 +24,14 @@ import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.ConsoleAppender;
import ch.qos.logback.core.FileAppender;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogLevelConfig;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.ProcessId;
import org.sonar.process.Props;
+import org.sonar.process.logging.RootLoggerConfig;
import static org.slf4j.Logger.ROOT_LOGGER_NAME;
-import static org.sonar.process.LogbackHelper.RootLoggerConfig.newRootLoggerConfigBuilder;
+import static org.sonar.process.logging.RootLoggerConfig.newRootLoggerConfigBuilder;
import static org.sonar.process.monitor.StreamGobbler.LOGGER_GOBBLER;
/**
@@ -108,7 +110,7 @@ class AppLogging {
private static final String CONSOLE_PLAIN_APPENDER = "CONSOLE";
private static final String APP_CONSOLE_APPENDER = "APP_CONSOLE";
private static final String GOBBLER_PLAIN_CONSOLE = "GOBBLER_CONSOLE";
- private static final LogbackHelper.RootLoggerConfig APP_ROOT_LOGGER_CONFIG = newRootLoggerConfigBuilder()
+ private static final RootLoggerConfig APP_ROOT_LOGGER_CONFIG = newRootLoggerConfigBuilder()
.setProcessId(ProcessId.APP)
.build();
@@ -126,7 +128,7 @@ class AppLogging {
} else {
configureWithWrapperWritingToFile(ctx);
}
- helper.configureRootLogLevel(props, ProcessId.APP);
+ helper.apply(LogLevelConfig.newBuilder().rootLevelFor(ProcessId.APP).build(), props);
return ctx;
}
diff --git a/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java b/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java
index c58854b8032..c382d61058f 100644
--- a/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java
+++ b/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java
@@ -39,7 +39,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.ProcessProperties;
import org.sonar.process.Props;