Skip to content

Commit 20f4022

Browse files
committed
Correctly truncate logging of response body
Fixes #22287
1 parent 020c537 commit 20f4022

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ else if (mediaType.isPresentIn(ALL_APPLICATION_MEDIA_TYPES)) {
284284
if (body != null) {
285285
Object theBody = body;
286286
LogFormatUtils.traceDebug(logger, traceOn ->
287-
"Writing [" + LogFormatUtils.formatValue(theBody, traceOn) + "]");
287+
"Writing [" + LogFormatUtils.formatValue(theBody, !traceOn) + "]");
288288
addContentDispositionHeader(inputMessage, outputMessage);
289289
if (genericConverter != null) {
290290
genericConverter.write(body, targetType, selectedMediaType, outputMessage);

0 commit comments

Comments
 (0)