]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8332 fix missing display of HTTP request ID in Web logs
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 17 Nov 2016 10:41:25 +0000 (11:41 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 17 Nov 2016 16:59:44 +0000 (17:59 +0100)
server/sonar-server/src/main/java/org/sonar/server/app/WebServerProcessLogging.java
server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java

index 325a453d2cba8c571cdcafd900e0cbd56be07df7..42c6bbfd19cf88bbc2378edd4b8fe6279252fec6 100644 (file)
@@ -33,7 +33,7 @@ import static org.sonar.process.LogbackHelper.LogDomain;
 public class WebServerProcessLogging extends ServerProcessLogging {
 
   public WebServerProcessLogging() {
-    super(ProcessId.WEB_SERVER, "%X{UID}");
+    super(ProcessId.WEB_SERVER, "%X{ID}");
   }
 
   @Override
index e3411dcd6f7dc733b1145049a2f18e16493bc803..4cf2d80ea33eede088d7435705da9d55651fe808 100644 (file)
@@ -85,7 +85,7 @@ public class WebServerProcessLoggingTest {
     assertThat(fileAppender.getFile()).isEqualTo(new File(logDir, "web.log").getAbsolutePath());
     assertThat(fileAppender.getEncoder()).isInstanceOf(PatternLayoutEncoder.class);
     PatternLayoutEncoder encoder = (PatternLayoutEncoder) fileAppender.getEncoder();
-    assertThat(encoder.getPattern()).isEqualTo("%d{yyyy.MM.dd HH:mm:ss} %-5level web[%X{UID}][%logger{20}] %msg%n");
+    assertThat(encoder.getPattern()).isEqualTo("%d{yyyy.MM.dd HH:mm:ss} %-5level web[%X{ID}][%logger{20}] %msg%n");
   }
 
   @Test