From 08161eb2651e9416785ca0b87fabdf9821953fa2 Mon Sep 17 00:00:00 2001 From: lukasz-jarocki-sonarsource Date: Thu, 26 Oct 2023 14:55:02 +0200 Subject: [PATCH] SONAR-20855 uploading logs on failure on cirrus --- .cirrus.yml | 2 ++ .../src/main/java/org/sonar/server/app/TomcatAccessLog.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9259997a475..11b32b50398 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -166,6 +166,8 @@ default_artifact_template: &DEFAULT_ARTIFACTS_TEMPLATE path: "**/build/reports/**/*" screenshots_artifacts: path: "**/build/screenshots/**/*" + log_artifacts: + path: "**/build/**/*.log" always: profile_artifacts: path: "**/build/reports/profile/**/*" diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/app/TomcatAccessLog.java b/server/sonar-webserver/src/main/java/org/sonar/server/app/TomcatAccessLog.java index 60a9bdf7621..1291477c373 100644 --- a/server/sonar-webserver/src/main/java/org/sonar/server/app/TomcatAccessLog.java +++ b/server/sonar-webserver/src/main/java/org/sonar/server/app/TomcatAccessLog.java @@ -33,7 +33,7 @@ class TomcatAccessLog { private static final String PROPERTY_ENABLE = "sonar.web.accessLogs.enable"; private static final String PROPERTY_PATTERN = "sonar.web.accessLogs.pattern"; - private static final String DEFAULT_SQ_ACCESS_LOG_PATTERN = "%h %l %u [%t] \"%r\" %s %b \"%i{Referer}\" \"%i{User-Agent}\" \"%reqAttribute{ID}\""; + private static final String DEFAULT_SQ_ACCESS_LOG_PATTERN = "%h %l %u [%t] \"%r\" %s %b \"%i{Referer}\" \"%i{User-Agent}\" \"%reqAttribute{ID}\" %D"; void configure(Tomcat tomcat, Props props) { tomcat.setSilent(true); -- 2.39.5