Class HttpLogConfig.BuilderBase<BUILDER extends HttpLogConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpLogConfig>

java.lang.Object
io.helidon.http.HttpLogConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
HttpLogConfig.Builder
Enclosing interface:
HttpLogConfig

public abstract static class HttpLogConfig.BuilderBase<BUILDER extends HttpLogConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpLogConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for HttpLogConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(HttpLogConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(HttpLogConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      @Deprecated public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends HttpLogConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpLogConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends HttpLogConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpLogConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • receiveLog

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

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

      public BUILDER clearLoggerName()
      Clear existing value of loggerName.
      Returns:
      updated builder instance
      See Also:
    • loggerName

      public BUILDER loggerName(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.
      Parameters:
      loggerName - logger name
      Returns:
      updated builder instance
      See Also:
    • clearSafeHeaders

      public BUILDER clearSafeHeaders()
      Clear all safeHeaders.
      Returns:
      updated builder instance
      See Also:
    • safeHeaders

      public BUILDER safeHeaders(Set<? extends 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.
      Parameters:
      safeHeaders - safe header names for protocol logging
      Returns:
      updated builder instance
      See Also:
    • addSafeHeaders

      public BUILDER addSafeHeaders(Set<? extends 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.
      Parameters:
      safeHeaders - safe header names for protocol logging
      Returns:
      updated builder instance
      See Also:
    • addSafeHeader

      public BUILDER addSafeHeader(HeaderName safeHeader)
      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.
      Parameters:
      safeHeader - add single safe header names for protocol logging
      Returns:
      updated builder instance
      See Also:
    • unsafeRawData

      public BUILDER 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.

      Parameters:
      unsafeRawData - whether raw protocol data can be logged at TRACE level
      Returns:
      updated builder instance
      See Also:
    • receiveLog

      public 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

      public 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

      public 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

      public 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

      public 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance