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.")) {
*/
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,