Skip to content

Commit 12240c7

Browse files
committed
Apply formatValue to a few remaining places
Issue: SPR-17254
1 parent e62298e commit 12240c7

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

spring-web/src/main/java/org/springframework/http/codec/FormHttpMessageWriter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ public Mono<Void> write(Publisher<? extends MultiValueMap<String, String>> input
134134
if (logger.isDebugEnabled()) {
135135
String s = Hints.getLogPrefix(hints) + "Writing " +
136136
(isEnableLoggingRequestDetails() ?
137-
form.toString() : "form fields " + form.keySet() + " (content masked)");
137+
formatValue(form, logger.isTraceEnabled()) :
138+
"form fields " + form.keySet() + " (content masked)");
138139
if (logger.isTraceEnabled()) {
139140
logger.trace(s);
140141
}

spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageReader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ public Mono<MultiValueMap<String, Part>> readMono(ResolvableType elementType,
9797
if (logger.isDebugEnabled()) {
9898
String s = Hints.getLogPrefix(hints) + "Parsed " +
9999
(isEnableLoggingRequestDetails() ?
100-
map.toString() : "parts " + map.keySet() + " (content masked)");
100+
formatValue(map, logger.isTraceEnabled()) :
101+
"parts " + map.keySet() + " (content masked)");
101102
if (logger.isTraceEnabled()) {
102103
logger.trace(s);
103104
}

spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ private Mono<Void> writeMultipart(
228228
if (logger.isDebugEnabled()) {
229229
String s = Hints.getLogPrefix(hints) + "Encoding " +
230230
(isEnableLoggingRequestDetails() ?
231-
map.toString() : "parts " + map.keySet() + " (content masked)");
231+
formatValue(map, logger.isTraceEnabled()) :
232+
"parts " + map.keySet() + " (content masked)");
232233
if (logger.isTraceEnabled()) {
233234
logger.trace(s);
234235
}

spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ public Flux<Part> read(ResolvableType elementType, ReactiveHttpInputMessage mess
9696
return Flux.create(new SynchronossPartGenerator(message, this.bufferFactory, this.streamStorageFactory))
9797
.doOnNext(part -> {
9898
if (logger.isDebugEnabled() && !Hints.isLoggingSuppressed(hints)) {
99-
String s = Hints.getLogPrefix(hints) + "Parsed " + (isEnableLoggingRequestDetails() ?
100-
part.toString() : "parts '" + part.name() + "' (content masked)");
99+
String s = Hints.getLogPrefix(hints) + "Parsed " +
100+
(isEnableLoggingRequestDetails() ?
101+
formatValue(part, logger.isTraceEnabled()) :
102+
"parts '" + part.name() + "' (content masked)");
101103
if (logger.isTraceEnabled()) {
102104
logger.trace(s);
103105
}

0 commit comments

Comments
 (0)