Skip to content

Commit

Permalink
SONAR-8332 fix missing display of HTTP request ID in Web logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sns-seb committed Nov 17, 2016
1 parent a5529e1 commit a96c954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class WebServerProcessLogging extends ServerProcessLogging {

public WebServerProcessLogging() {
super(ProcessId.WEB_SERVER, "%X{UID}");
super(ProcessId.WEB_SERVER, "%X{ID}");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void log_to_web_file() {
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
Expand Down

0 comments on commit a96c954

Please sign in to comment.