Browse Source

SONAR-4675 add some documentation

tags/4.0
Simon Brandhof 10 years ago
parent
commit
481a4dcc41

+ 8
- 1
sonar-application/src/main/assembly/conf/logback-access.xml View File

@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!--

See http://logback.qos.ch/access.html#configuration
Log HTTP requests in the file logs/access.log

See http://logback.qos.ch/access.html#configuration

-->

<configuration debug="false">

<!-- Required for performance reason. See http://www.slf4j.org/legacy.html#jul-to-slf4j -->
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">

+ 7
- 1
sonar-application/src/main/assembly/conf/logback.xml View File

@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!--
Logging configuration.
By default logs are generated in logs/sonar.log.

See http://logback.qos.ch/manual/configuration.html
-->
<configuration debug="false">
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/>

@@ -21,7 +27,7 @@
</encoder>
</appender>

<!-- Display Rails warnings and errors in the standard Sonar log -->
<!-- Display Rails warnings and errors -->
<logger name="rails" additivity="false">
<level value="WARN"/>
<appender-ref ref="SONAR_FILE"/>

+ 0
- 3
sonar-application/src/main/java/org/sonar/application/Connectors.java View File

@@ -35,9 +35,6 @@ class Connectors {
configureShutdown(tomcat, props);

Connector connector = new Connector("HTTP/1.1");

// TODO manage redirects from other ports ?

connector.setPort(props.intOf("sonar.web.port", 9000));
connector.setURIEncoding("UTF-8");
configurePool(props, connector);

+ 3
- 0
sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java View File

@@ -47,6 +47,9 @@ class EmbeddedTomcat {
// See Ruby on Rails url_for
System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true");

// Required for webapp and logback xml files
System.setProperty("SONAR_HOME", env.rootDir().getAbsolutePath());

tomcat = new Tomcat();

// Initialize directories

+ 1
- 0
sonar-application/src/main/java/org/sonar/application/NullJarScanner.java View File

@@ -31,5 +31,6 @@ import java.util.Set;
class NullJarScanner implements JarScanner {
@Override
public void scan(ServletContext context, ClassLoader classloader, JarScannerCallback callback, Set<String> jarsToSkip) {
// doing nothing is fast!
}
}

+ 0
- 1
sonar-application/src/main/java/org/sonar/application/StartServer.java View File

@@ -20,7 +20,6 @@
package org.sonar.application;

// TODO dev mode
// TODO sanitize jetty dependencies
// TODO remove logback/slf4j from sonar-server

public final class StartServer {

+ 1
- 2
sonar-application/src/main/java/org/sonar/application/Webapp.java View File

@@ -27,9 +27,8 @@ class Webapp {
static void configure(Tomcat tomcat, Env env, Props props) {
String ctx = props.of("sonar.web.context", "/");
try {
System.setProperty("SONAR_HOME", env.rootDir().getAbsolutePath());
Context context = tomcat.addWebapp(ctx, env.file("web").getAbsolutePath());
context.setConfigFile(env.file("web/META-INF/context.xml").toURL());
context.setConfigFile(env.file("web/META-INF/context.xml").toURI().toURL());
context.setJarScanner(new NullJarScanner());

} catch (Exception e) {

Loading…
Cancel
Save