From: Simon Brandhof Date: Mon, 2 Oct 2017 20:39:29 +0000 (+0200) Subject: SONAR-9902 Silence debug logs of PostgreSQL driver X-Git-Tag: 6.6-RC1~81 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=879d4202c79764a5bdbce8577efd2049f2e3af17;p=sonarqube.git SONAR-9902 Silence debug logs of PostgreSQL driver --- 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 bdf681b0c3f..e89eba0f90b 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 @@ -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 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 caccee2097a..a91aa4b8cf2 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 @@ -47,7 +47,8 @@ public abstract class ServerProcessLogging { "sun.rmi.transport.misc", "sun.rmi.server.call", "sun.rmi.dgc"); - protected static final Set MSQDRIVER_LOGGER_NAMES_TO_TURN_OFF = ImmutableSet.of( + protected static final Set 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); 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 3ec69e7f9c7..e17ca6e5e71 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 @@ -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