Class LoggingCodecSupport

java.lang.Object
org.springframework.http.codec.LoggingCodecSupport
Direct Known Subclasses:
DefaultPartHttpMessageReader, FormHttpMessageReader, FormHttpMessageWriter, MultipartHttpMessageReader, MultipartWriterSupport, PartEventHttpMessageReader

public class LoggingCodecSupport extends Object
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 Details

    • logger

      protected final Log 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.