]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9902 Silence debug logs of PostgreSQL driver
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 2 Oct 2017 20:39:29 +0000 (22:39 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 3 Oct 2017 10:27:08 +0000 (12:27 +0200)
server/sonar-server/src/main/java/org/sonar/ce/log/CeProcessLogging.java
server/sonar-server/src/main/java/org/sonar/server/app/ServerProcessLogging.java
server/sonar-server/src/main/java/org/sonar/server/app/WebServerProcessLogging.java

index bdf681b0c3fecec72e85d1fb21642d42e1709fc1..e89eba0f90b8bfc441ceedf24c30c676fc92e281 100644 (file)
@@ -41,7 +41,7 @@ public class CeProcessLogging extends ServerProcessLogging {
     logLevelConfigBuilder.levelByDomain("sql", ProcessId.COMPUTE_ENGINE, LogDomain.SQL);
     logLevelConfigBuilder.levelByDomain("es", ProcessId.COMPUTE_ENGINE, LogDomain.ES);
     JMX_RMI_LOGGER_NAMES.forEach(loggerName -> logLevelConfigBuilder.levelByDomain(loggerName, ProcessId.COMPUTE_ENGINE, LogDomain.JMX));
-    MSQDRIVER_LOGGER_NAMES_TO_TURN_OFF.forEach(loggerName -> logLevelConfigBuilder.immutableLevel(loggerName, Level.OFF));
+    LOGGER_NAMES_TO_TURN_OFF.forEach(loggerName -> logLevelConfigBuilder.immutableLevel(loggerName, Level.OFF));
   }
 
   @Override
index caccee2097a700066e3c76db5966e1cf9ee24d23..a91aa4b8cf2ad3503546831edc4f17e671edad7e 100644 (file)
@@ -47,7 +47,8 @@ public abstract class ServerProcessLogging {
     "sun.rmi.transport.misc",
     "sun.rmi.server.call",
     "sun.rmi.dgc");
-  protected static final Set<String> MSQDRIVER_LOGGER_NAMES_TO_TURN_OFF = ImmutableSet.of(
+  protected static final Set<String> LOGGER_NAMES_TO_TURN_OFF = ImmutableSet.of(
+    // mssql driver
     "com.microsoft.sqlserver.jdbc.internals",
     "com.microsoft.sqlserver.jdbc.ResultSet",
     "com.microsoft.sqlserver.jdbc.Statement",
@@ -78,6 +79,8 @@ public abstract class ServerProcessLogging {
     builder.immutableLevel("org.apache.coyote", Level.INFO);
     builder.immutableLevel("org.apache.jasper", Level.INFO);
     builder.immutableLevel("org.apache.tomcat", Level.INFO);
+    builder.immutableLevel("org.postgresql.core.v3.QueryExecutorImpl", Level.INFO);
+    builder.immutableLevel("org.postgresql.jdbc.PgConnection", Level.INFO);
 
     extendLogLevelConfiguration(builder);
 
index 3ec69e7f9c70cf94f26e172cdb50132568c757c4..e17ca6e5e712a040579c2be269f9532cd93b8878 100644 (file)
@@ -46,7 +46,7 @@ public class WebServerProcessLogging extends ServerProcessLogging {
     logLevelConfigBuilder.offUnlessTrace("org.apache.catalina.core.StandardContext");
     logLevelConfigBuilder.offUnlessTrace("org.apache.catalina.core.StandardService");
 
-    MSQDRIVER_LOGGER_NAMES_TO_TURN_OFF.forEach(loggerName -> logLevelConfigBuilder.immutableLevel(loggerName, Level.OFF));
+    LOGGER_NAMES_TO_TURN_OFF.forEach(loggerName -> logLevelConfigBuilder.immutableLevel(loggerName, Level.OFF));
   }
 
   @Override