aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-11-28 16:54:28 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-12-01 12:29:39 +0100
commit23a030e194b0b0c58c9475c13a39493cf6c0dc8f (patch)
treecbc39dfa7a270236125c0deabb2d8dacaa77de60
parentb38069ecab3b9ba05a94469bb8bc515a49bd2405 (diff)
downloadsonarqube-23a030e194b0b0c58c9475c13a39493cf6c0dc8f.tar.gz
sonarqube-23a030e194b0b0c58c9475c13a39493cf6c0dc8f.zip
SONAR-8335 move LogBackHelper to subpackage logging
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java2
-rw-r--r--server/sonar-process/src/main/java/org/sonar/process/logging/LogbackHelper.java (renamed from server/sonar-process/src/main/java/org/sonar/process/LogbackHelper.java)6
-rw-r--r--server/sonar-process/src/test/java/org/sonar/process/logging/LogbackHelperTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/LogbackHelperTest.java)5
-rw-r--r--server/sonar-search/src/main/java/org/sonar/search/SearchLogging.java4
-rw-r--r--server/sonar-search/src/test/java/org/sonar/search/SearchLoggingTest.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/ce/log/CeProcessLogging.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/app/ServerProcessLogging.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/app/WebServerProcessLogging.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/ServerLogging.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/ws/ChangeLogLevelAction.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/ce/log/CeLoggingTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/ce/log/CeProcessLoggingTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/app/ProgrammaticLogbackValveTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/ServerLoggingTest.java2
-rw-r--r--sonar-application/src/main/java/org/sonar/application/AppLogging.java4
-rw-r--r--sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java2
-rw-r--r--sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java2
-rw-r--r--sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java2
-rw-r--r--sonar-db/src/test/java/org/sonar/db/TestDb.java2
22 files changed, 34 insertions, 27 deletions
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 fe082dbbc7a..c9711c9de2e 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
@@ -63,7 +63,7 @@ import org.sonar.db.DbClient;
import org.sonar.db.DefaultDatabase;
import org.sonar.db.purge.PurgeProfiler;
import org.sonar.db.version.DatabaseVersion;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.Props;
import org.sonar.server.component.ComponentCleanerService;
import org.sonar.server.component.ComponentFinder;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/LogbackHelper.java b/server/sonar-process/src/main/java/org/sonar/process/logging/LogbackHelper.java
index ac9351d8ad2..15b129cdbe0 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/LogbackHelper.java
+++ b/server/sonar-process/src/main/java/org/sonar/process/logging/LogbackHelper.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.process;
+package org.sonar.process.logging;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
@@ -43,6 +43,10 @@ import java.util.Set;
import javax.annotation.CheckForNull;
import org.apache.commons.lang.StringUtils;
import org.slf4j.LoggerFactory;
+import org.sonar.process.MessageException;
+import org.sonar.process.ProcessId;
+import org.sonar.process.ProcessProperties;
+import org.sonar.process.Props;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/LogbackHelperTest.java b/server/sonar-process/src/test/java/org/sonar/process/logging/LogbackHelperTest.java
index 3ffc86c64e9..1037de3f863 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/LogbackHelperTest.java
+++ b/server/sonar-process/src/test/java/org/sonar/process/logging/LogbackHelperTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.process;
+package org.sonar.process.logging;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
@@ -38,6 +38,9 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
+import org.sonar.process.MessageException;
+import org.sonar.process.ProcessProperties;
+import org.sonar.process.Props;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
diff --git a/server/sonar-search/src/main/java/org/sonar/search/SearchLogging.java b/server/sonar-search/src/main/java/org/sonar/search/SearchLogging.java
index d0216cc89f6..5d3e857bede 100644
--- a/server/sonar-search/src/main/java/org/sonar/search/SearchLogging.java
+++ b/server/sonar-search/src/main/java/org/sonar/search/SearchLogging.java
@@ -20,11 +20,11 @@
package org.sonar.search;
import ch.qos.logback.classic.LoggerContext;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.ProcessId;
import org.sonar.process.Props;
-import static org.sonar.process.LogbackHelper.RootLoggerConfig.newRootLoggerConfigBuilder;
+import static org.sonar.process.logging.LogbackHelper.RootLoggerConfig.newRootLoggerConfigBuilder;
public class SearchLogging {
diff --git a/server/sonar-search/src/test/java/org/sonar/search/SearchLoggingTest.java b/server/sonar-search/src/test/java/org/sonar/search/SearchLoggingTest.java
index c1a18209704..2017d61a19d 100644
--- a/server/sonar-search/src/test/java/org/sonar/search/SearchLoggingTest.java
+++ b/server/sonar-search/src/test/java/org/sonar/search/SearchLoggingTest.java
@@ -35,7 +35,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;
diff --git a/server/sonar-server/src/main/java/org/sonar/ce/log/CeProcessLogging.java b/server/sonar-server/src/main/java/org/sonar/ce/log/CeProcessLogging.java
index 566aa1be7d0..76fdafff714 100644
--- a/server/sonar-server/src/main/java/org/sonar/ce/log/CeProcessLogging.java
+++ b/server/sonar-server/src/main/java/org/sonar/ce/log/CeProcessLogging.java
@@ -19,13 +19,13 @@
*/
package org.sonar.ce.log;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.ProcessId;
import org.sonar.process.Props;
import org.sonar.server.app.ServerProcessLogging;
import static org.sonar.ce.log.CeLogging.MDC_CE_TASK_UUID;
-import static org.sonar.process.LogbackHelper.LogDomain;
+import static org.sonar.process.logging.LogbackHelper.LogDomain;
/**
* Configure logback for the Compute Engine process. Logs are written to file "ce.log" in SQ's log directory.
diff --git a/server/sonar-server/src/main/java/org/sonar/server/app/ServerProcessLogging.java b/server/sonar-server/src/main/java/org/sonar/server/app/ServerProcessLogging.java
index c8c0d9bc6b4..4692e71401c 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/app/ServerProcessLogging.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/app/ServerProcessLogging.java
@@ -22,12 +22,12 @@ package org.sonar.server.app;
import ch.qos.logback.classic.LoggerContext;
import com.google.common.collect.ImmutableSet;
import java.util.Set;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.ProcessId;
import org.sonar.process.Props;
import org.sonar.server.platform.ServerLogging;
-import static org.sonar.process.LogbackHelper.RootLoggerConfig.newRootLoggerConfigBuilder;
+import static org.sonar.process.logging.LogbackHelper.RootLoggerConfig.newRootLoggerConfigBuilder;
public abstract class ServerProcessLogging {
protected static final Set<String> JMX_RMI_LOGGER_NAMES = ImmutableSet.of(
diff --git a/server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java b/server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java
index 18792c1676f..cb938e59f0e 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/app/TomcatAccessLog.java
@@ -26,7 +26,7 @@ import org.apache.catalina.LifecycleListener;
import org.apache.catalina.startup.Tomcat;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.Props;
class TomcatAccessLog {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/app/WebServerProcessLogging.java b/server/sonar-server/src/main/java/org/sonar/server/app/WebServerProcessLogging.java
index 6b101065be5..202b9e1f5ce 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/app/WebServerProcessLogging.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/app/WebServerProcessLogging.java
@@ -21,11 +21,11 @@ package org.sonar.server.app;
import java.util.logging.LogManager;
import org.slf4j.bridge.SLF4JBridgeHandler;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.ProcessId;
import org.sonar.process.Props;
-import static org.sonar.process.LogbackHelper.LogDomain;
+import static org.sonar.process.logging.LogbackHelper.LogDomain;
import static org.sonar.server.platform.web.requestid.RequestIdMDCStorage.HTTP_REQUEST_ID_MDC_KEY;
/**
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerLogging.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerLogging.java
index 5fe0cbb7d3b..2f996b7bca1 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerLogging.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerLogging.java
@@ -29,7 +29,7 @@ import org.sonar.api.config.Settings;
import org.sonar.api.server.ServerSide;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.ProcessProperties;
@ServerSide
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
index d2543fb2b93..6fecd6991dc 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
@@ -37,7 +37,7 @@ import org.sonar.db.DefaultDatabase;
import org.sonar.db.purge.PurgeProfiler;
import org.sonar.db.semaphore.SemaphoresImpl;
import org.sonar.db.version.DatabaseVersion;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.server.app.ProcessCommandWrapperImpl;
import org.sonar.server.app.RestartFlagHolderImpl;
import org.sonar.server.issue.index.IssueIndex;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ws/ChangeLogLevelAction.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ws/ChangeLogLevelAction.java
index 74917769dab..be2d3602580 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/ws/ChangeLogLevelAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ws/ChangeLogLevelAction.java
@@ -28,7 +28,7 @@ import org.sonar.db.Database;
import org.sonar.server.platform.ServerLogging;
import org.sonar.server.user.UserSession;
-import static org.sonar.process.LogbackHelper.allowedLogLevels;
+import static org.sonar.process.logging.LogbackHelper.allowedLogLevels;
public class ChangeLogLevelAction implements SystemWsAction {
diff --git a/server/sonar-server/src/test/java/org/sonar/ce/log/CeLoggingTest.java b/server/sonar-server/src/test/java/org/sonar/ce/log/CeLoggingTest.java
index c251892a284..53c28708c2e 100644
--- a/server/sonar-server/src/test/java/org/sonar/ce/log/CeLoggingTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/ce/log/CeLoggingTest.java
@@ -27,7 +27,7 @@ import org.junit.rules.ExpectedException;
import org.mockito.Mockito;
import org.slf4j.MDC;
import org.sonar.ce.queue.CeTask;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;
diff --git a/server/sonar-server/src/test/java/org/sonar/ce/log/CeProcessLoggingTest.java b/server/sonar-server/src/test/java/org/sonar/ce/log/CeProcessLoggingTest.java
index 41474bed5a9..d2bc08de935 100644
--- a/server/sonar-server/src/test/java/org/sonar/ce/log/CeProcessLoggingTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/ce/log/CeProcessLoggingTest.java
@@ -36,7 +36,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;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/app/ProgrammaticLogbackValveTest.java b/server/sonar-server/src/test/java/org/sonar/server/app/ProgrammaticLogbackValveTest.java
index 3099b2bc34e..01f919098d3 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/app/ProgrammaticLogbackValveTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/app/ProgrammaticLogbackValveTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.app;
import org.apache.catalina.Container;
import org.junit.AfterClass;
import org.junit.Test;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java b/server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java
index a81077b6793..5a7d401f027 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java
@@ -36,7 +36,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;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ServerLoggingTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ServerLoggingTest.java
index c3b6f9b8d68..04ed0957618 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/ServerLoggingTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ServerLoggingTest.java
@@ -31,7 +31,7 @@ import org.sonar.api.config.MapSettings;
import org.sonar.api.config.Settings;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import org.sonar.process.ProcessProperties;
import static org.assertj.core.api.Assertions.assertThat;
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..992cca0ec65 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,12 @@ 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.LogbackHelper;
import org.sonar.process.ProcessId;
import org.sonar.process.Props;
import static org.slf4j.Logger.ROOT_LOGGER_NAME;
-import static org.sonar.process.LogbackHelper.RootLoggerConfig.newRootLoggerConfigBuilder;
+import static org.sonar.process.logging.LogbackHelper.RootLoggerConfig.newRootLoggerConfigBuilder;
import static org.sonar.process.monitor.StreamGobbler.LOGGER_GOBBLER;
/**
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;
diff --git a/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java b/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java
index 5a1995161d9..8520edd25a8 100644
--- a/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java
+++ b/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java
@@ -40,7 +40,7 @@ import org.sonar.db.dialect.DialectUtils;
import org.sonar.db.profiling.NullConnectionInterceptor;
import org.sonar.db.profiling.ProfiledConnectionInterceptor;
import org.sonar.db.profiling.ProfiledDataSource;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import static java.lang.String.format;
diff --git a/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java b/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java
index 454dcbac3ac..c130cfa5799 100644
--- a/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java
@@ -25,7 +25,7 @@ import org.junit.Test;
import org.sonar.api.config.Settings;
import org.sonar.api.config.MapSettings;
import org.sonar.db.dialect.PostgreSql;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-db/src/test/java/org/sonar/db/TestDb.java b/sonar-db/src/test/java/org/sonar/db/TestDb.java
index 4f6d0c0c0b0..c1a99c0e896 100644
--- a/sonar-db/src/test/java/org/sonar/db/TestDb.java
+++ b/sonar-db/src/test/java/org/sonar/db/TestDb.java
@@ -41,7 +41,7 @@ import org.sonar.api.config.MapSettings;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.db.dialect.H2;
-import org.sonar.process.LogbackHelper;
+import org.sonar.process.logging.LogbackHelper;
/**
* This class should be call using @ClassRule in order to create the schema once (ft @Rule is used