Skip to content

Commit 575bf59

Browse files
committed
Merge branch 'main' into 4.0.x
Closes gh-45949
2 parents ad67fe3 + 9743ee2 commit 575bf59

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ public static class Accesslog {
12681268
/**
12691269
* Log format.
12701270
*/
1271-
private FORMAT format = FORMAT.NCSA;
1271+
private Format format = Format.NCSA;
12721272

12731273
/**
12741274
* Custom log format, see org.eclipse.jetty.server.CustomRequestLog. If
@@ -1309,11 +1309,11 @@ public void setEnabled(boolean enabled) {
13091309
this.enabled = enabled;
13101310
}
13111311

1312-
public FORMAT getFormat() {
1312+
public Format getFormat() {
13131313
return this.format;
13141314
}
13151315

1316-
public void setFormat(FORMAT format) {
1316+
public void setFormat(Format format) {
13171317
this.format = format;
13181318
}
13191319

@@ -1368,7 +1368,7 @@ public void setIgnorePaths(List<String> ignorePaths) {
13681368
/**
13691369
* Log format for Jetty access logs.
13701370
*/
1371-
public enum FORMAT {
1371+
public enum Format {
13721372

13731373
/**
13741374
* NCSA format, as defined in CustomRequestLog#NCSA_FORMAT.

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@
3333
import org.eclipse.jetty.server.RequestLogWriter;
3434

3535
import org.springframework.boot.autoconfigure.web.ServerProperties;
36+
import org.springframework.boot.autoconfigure.web.ServerProperties.Jetty.Accesslog.Format;
3637
import org.springframework.boot.cloud.CloudPlatform;
3738
import org.springframework.boot.context.properties.PropertyMapper;
3839
import org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory;
@@ -201,7 +202,7 @@ private String getLogFormat(ServerProperties.Jetty.Accesslog properties) {
201202
if (properties.getCustomFormat() != null) {
202203
return properties.getCustomFormat();
203204
}
204-
if (ServerProperties.Jetty.Accesslog.FORMAT.EXTENDED_NCSA.equals(properties.getFormat())) {
205+
if (Format.EXTENDED_NCSA.equals(properties.getFormat())) {
205206
return CustomRequestLog.EXTENDED_NCSA_FORMAT;
206207
}
207208
return CustomRequestLog.NCSA_FORMAT;

0 commit comments

Comments
 (0)