Package org.springframework.http.codec
Class LoggingCodecSupport
java.lang.Object
org.springframework.http.codec.LoggingCodecSupport
- Direct Known Subclasses:
DefaultPartHttpMessageReader
,FormHttpMessageReader
,FormHttpMessageWriter
,MultipartHttpMessageReader
,MultipartWriterSupport
,PartEventHttpMessageReader
Base class for
Encoder
,
Decoder
, HttpMessageReader
, or
HttpMessageWriter
that uses a logger and shows potentially sensitive
request data.- Since:
- 5.1
- Author:
- Rossen Stoyanchev
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether any logging of values being encoded or decoded is explicitly disabled regardless of log level.void
setEnableLoggingRequestDetails
(boolean enable) Whether to log form data at DEBUG level, and headers at TRACE level.
-
Field Details
-
logger
-
-
Constructor Details
-
LoggingCodecSupport
public LoggingCodecSupport()
-
-
Method Details
-
setEnableLoggingRequestDetails
public void setEnableLoggingRequestDetails(boolean enable) Whether to log form data at DEBUG level, and headers at TRACE level. Both may contain sensitive information.By default set to
false
so that request details are not shown.- Parameters:
enable
- whether to enable or not
-
isEnableLoggingRequestDetails
public boolean isEnableLoggingRequestDetails()Whether any logging of values being encoded or decoded is explicitly disabled regardless of log level.
-