Interface HttpLogConfig

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
HttpLogConfig.BuilderBase.HttpLogConfigImpl

public interface HttpLogConfig extends Prototype.Api
Configuration of logging of the HTTP layer.

The log level is defined by loggerName() + "." + prefix, such as send or recv.

See Also:
  • Method Details

    • builder

      static HttpLogConfig.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static HttpLogConfig.Builder builder(HttpLogConfig instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static HttpLogConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      @Deprecated static HttpLogConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static HttpLogConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • receiveLog

      boolean receiveLog()
      Logging of received packets. Uses trace and debug levels on configured logger with suffix of .recv`.
      Returns:
      true if logging should be enabled for received packets, false if no logging should be done
      See Also:
    • sendLog

      boolean sendLog()
      Logging of sent packets. Uses trace and debug levels on configured logger with suffix of .send`.
      Returns:
      true if logging should be enabled for sent packets, false if no logging should be done
      See Also:
    • loggerName

      Optional<String> loggerName()
      Base name of the logger to use when logging receive and send packets. Either send or recv is added as another level depending on log direction.
      Returns:
      logger name
    • safeHeaders

      Set<HeaderName> safeHeaders()
      Header names whose values can be logged at debug level, except sensitive names that are always redacted. All other header values are redacted in protocol logs. Headers such as Authorization, cookies, and names containing token, password, secret, or key are never logged even when configured here.
      Returns:
      safe header names for protocol logging
    • unsafeRawData

      boolean unsafeRawData()
      Whether TRACE protocol logs can include raw protocol data.

      This is an unsafe diagnostic option. When enabled together with TRACE logging, protocol logs can include sensitive request or response data such as header values and entity bytes. This option can only be enabled programmatically through the builder.

      Returns:
      whether raw protocol data can be logged at TRACE level