From: Sébastien Lesaint Date: Thu, 17 Nov 2016 10:41:25 +0000 (+0100) Subject: SONAR-8332 fix missing display of HTTP request ID in Web logs X-Git-Tag: 6.2-RC1~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a96c95487b97c7b3cf3161574f85163402bf584a;p=sonarqube.git SONAR-8332 fix missing display of HTTP request ID in Web logs --- 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 325a453d2cb..42c6bbfd19c 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 @@ -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 diff --git a/server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java b/server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java index e3411dcd6f7..4cf2d80ea33 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/app/WebServerProcessLoggingTest.java @@ -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