Apply formatValue to a few remaining places

Issue: SPR-17254
This commit is contained in:
Rossen Stoyanchev 2018-09-14 12:37:00 -04:00
parent e62298eaad
commit 12240c7524
4 changed files with 10 additions and 5 deletions

View File

@ -134,7 +134,8 @@ public class FormHttpMessageWriter extends LoggingCodecSupport
if (logger.isDebugEnabled()) {
String s = Hints.getLogPrefix(hints) + "Writing " +
(isEnableLoggingRequestDetails() ?
form.toString() : "form fields " + form.keySet() + " (content masked)");
formatValue(form, logger.isTraceEnabled()) :
"form fields " + form.keySet() + " (content masked)");
if (logger.isTraceEnabled()) {
logger.trace(s);
}

View File

@ -97,7 +97,8 @@ public class MultipartHttpMessageReader extends LoggingCodecSupport
if (logger.isDebugEnabled()) {
String s = Hints.getLogPrefix(hints) + "Parsed " +
(isEnableLoggingRequestDetails() ?
map.toString() : "parts " + map.keySet() + " (content masked)");
formatValue(map, logger.isTraceEnabled()) :
"parts " + map.keySet() + " (content masked)");
if (logger.isTraceEnabled()) {
logger.trace(s);
}

View File

@ -228,7 +228,8 @@ public class MultipartHttpMessageWriter extends LoggingCodecSupport
if (logger.isDebugEnabled()) {
String s = Hints.getLogPrefix(hints) + "Encoding " +
(isEnableLoggingRequestDetails() ?
map.toString() : "parts " + map.keySet() + " (content masked)");
formatValue(map, logger.isTraceEnabled()) :
"parts " + map.keySet() + " (content masked)");
if (logger.isTraceEnabled()) {
logger.trace(s);
}

View File

@ -96,8 +96,10 @@ public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implem
return Flux.create(new SynchronossPartGenerator(message, this.bufferFactory, this.streamStorageFactory))
.doOnNext(part -> {
if (logger.isDebugEnabled() && !Hints.isLoggingSuppressed(hints)) {
String s = Hints.getLogPrefix(hints) + "Parsed " + (isEnableLoggingRequestDetails() ?
part.toString() : "parts '" + part.name() + "' (content masked)");
String s = Hints.getLogPrefix(hints) + "Parsed " +
(isEnableLoggingRequestDetails() ?
formatValue(part, logger.isTraceEnabled()) :
"parts '" + part.name() + "' (content masked)");
if (logger.isTraceEnabled()) {
logger.trace(s);
}