diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-23 16:58:56 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-23 16:59:06 +0200 |
commit | b7d09c38a8ffd827142b271eb3eb4635058226f2 (patch) | |
tree | 32bb401c4ddccce9949c76c950df95fabc986b49 | |
parent | 79f3c8c6f42593a25e8b1789373e356cae1ed6e3 (diff) | |
download | sonarqube-b7d09c38a8ffd827142b271eb3eb4635058226f2.tar.gz sonarqube-b7d09c38a8ffd827142b271eb3eb4635058226f2.zip |
SONAR-4898 fix support of sonar.log.console
-rw-r--r-- | server/sonar-server-app/src/main/java/org/sonar/server/app/Webapp.java | 4 | ||||
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/platform/PlatformServletContextListener.java | 10 |
2 files changed, 3 insertions, 11 deletions
diff --git a/server/sonar-server-app/src/main/java/org/sonar/server/app/Webapp.java b/server/sonar-server-app/src/main/java/org/sonar/server/app/Webapp.java index b3846901994..5ad563df59c 100644 --- a/server/sonar-server-app/src/main/java/org/sonar/server/app/Webapp.java +++ b/server/sonar-server-app/src/main/java/org/sonar/server/app/Webapp.java @@ -32,16 +32,12 @@ class Webapp { private static final String JRUBY_MAX_RUNTIMES = "jruby.max.runtimes"; private static final String RAILS_ENV = "rails.env"; private static final String PROPERTY_CONTEXT = "sonar.web.context"; - private static final String PROPERTY_LOG_PROFILING_LEVEL = "sonar.log.profilingLevel"; - private static final String PROPERTY_LOG_CONSOLE = "sonar.log.console"; static void configure(Tomcat tomcat, Props props) { try { String webDir = props.of("sonar.path.web"); Context context = tomcat.addWebapp(getContextPath(props), webDir); context.setConfigFile(new File(webDir, "META-INF/context.xml").toURI().toURL()); - context.addParameter(PROPERTY_LOG_PROFILING_LEVEL, props.of(PROPERTY_LOG_PROFILING_LEVEL, "NONE")); - context.addParameter(PROPERTY_LOG_CONSOLE, props.of(PROPERTY_LOG_CONSOLE, "false")); for (Map.Entry<Object, Object> entry : props.cryptedProperties().entrySet()) { String key = entry.getKey().toString(); if (key.startsWith("sonar.")) { diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/PlatformServletContextListener.java b/server/sonar-server/src/main/java/org/sonar/server/platform/PlatformServletContextListener.java index 250832144d1..9cee68b1261 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/PlatformServletContextListener.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/PlatformServletContextListener.java @@ -91,14 +91,10 @@ public final class PlatformServletContextListener implements ServletContextListe */ private void configureLogback(ServletContextEvent event) { String configProfilingLevel = defaultIfEmpty( - event.getServletContext().getInitParameter(Profiling.CONFIG_PROFILING_LEVEL), - System.getProperty(Profiling.CONFIG_PROFILING_LEVEL)); + event.getServletContext().getInitParameter(Profiling.CONFIG_PROFILING_LEVEL), "NONE"); Profiling.Level profilingLevel = Profiling.Level.fromConfigString(configProfilingLevel); - String consoleEnabled = defaultIfEmpty(defaultIfEmpty( - event.getServletContext().getInitParameter(CONFIG_LOG_CONSOLE), - System.getProperty(CONFIG_LOG_CONSOLE)), - // Line below used in last resort - "false"); + String consoleEnabled = defaultIfEmpty( + event.getServletContext().getInitParameter(CONFIG_LOG_CONSOLE), "false"); Map<String, String> variables = ImmutableMap.of( "LOGFILE_LOGGING_FORMAT", profilingLevel == Profiling.Level.FULL ? LOGFILE_FULL_LOGGING_FORMAT : LOGFILE_STANDARD_LOGGING_FORMAT, "CONSOLE_LOGGING_FORMAT", profilingLevel == Profiling.Level.FULL ? CONSOLE_FULL_LOGGING_FORMAT : CONSOLE_STANDARD_LOGGING_FORMAT, |