]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20331 improved json timestamp formatting to more consistent
authorlukasz-jarocki-sonarsource <lukasz.jarocki@sonarsource.com>
Thu, 28 Mar 2024 14:50:27 +0000 (15:50 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 28 Mar 2024 20:02:51 +0000 (20:02 +0000)
server/sonar-process/src/main/java/org/sonar/process/logging/LogbackJsonLayout.java

index 40cc70323dda70fc2bab7c7bda32c24795bd1713..8103200290d73ba0bebe5f11b7ce527351038a5b 100644 (file)
@@ -46,7 +46,7 @@ import static java.util.Objects.requireNonNull;
  */
 public class LogbackJsonLayout extends LayoutBase<ILoggingEvent> {
 
-  static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ISO_OFFSET_DATE_TIME
+  static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
     .withLocale(Locale.US)
     .withZone(ZoneId.systemDefault());
   private static final Pattern NEWLINE_REGEXP = Pattern.compile("\n");