Module io.helidon.http
Package io.helidon.http
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 builderPROTOTYPE- type of the prototype interface that would be built byPrototype.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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSafeHeader(HeaderName safeHeader) Header names whose values can be logged at debug level, except sensitive names that are always redacted.addSafeHeaders(Set<? extends HeaderName> safeHeaders) Header names whose values can be logged at debug level, except sensitive names that are always redacted.Clear existing value of loggerName.Clear all safeHeaders.config()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).from(HttpLogConfig prototype) Update this builder from an existing prototype instance.from(HttpLogConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Base name of the logger to use when logging receive and send packets.loggerName(String loggerName) Base name of the logger to use when logging receive and send packets.protected voidHandles providers and decorators.booleanLogging of received packets.receiveLog(boolean receiveLog) Logging of received packets.Header names whose values can be logged at debug level, except sensitive names that are always redacted.safeHeaders(Set<? extends HeaderName> safeHeaders) Header names whose values can be logged at debug level, except sensitive names that are always redacted.booleansendLog()Logging of sent packets.sendLog(boolean sendLog) Logging of sent packets.toString()booleanWhether TRACE protocol logs can include raw protocol data.unsafeRawData(boolean unsafeRawData) Whether TRACE protocol logs can include raw protocol data.protected voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
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
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.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.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
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.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
Logging of received packets. Uses trace and debug levels on configured logger with suffix of.recv`.- Parameters:
receiveLog-trueif logging should be enabled for received packets,falseif no logging should be done- Returns:
- updated builder instance
- See Also:
-
sendLog
Logging of sent packets. Uses trace and debug levels on configured logger with suffix of.send`.- Parameters:
sendLog-trueif logging should be enabled for sent packets,falseif no logging should be done- Returns:
- updated builder instance
- See Also:
-
clearLoggerName
Clear existing value of loggerName.- Returns:
- updated builder instance
- See Also:
-
loggerName
Base name of the logger to use when logging receive and send packets. Eithersendorrecvis added as another level depending on log direction.- Parameters:
loggerName- logger name- Returns:
- updated builder instance
- See Also:
-
clearSafeHeaders
Clear all safeHeaders.- Returns:
- updated builder instance
- See Also:
-
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 asAuthorization, cookies, and names containingtoken,password,secret, orkeyare never logged even when configured here.- Parameters:
safeHeaders- safe header names for protocol logging- Returns:
- updated builder instance
- See Also:
-
addSafeHeaders
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 asAuthorization, cookies, and names containingtoken,password,secret, orkeyare never logged even when configured here.- Parameters:
safeHeaders- safe header names for protocol logging- Returns:
- updated builder instance
- See Also:
-
addSafeHeader
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 asAuthorization, cookies, and names containingtoken,password,secret, orkeyare never logged even when configured here.- Parameters:
safeHeader- add single safe header names for protocol logging- Returns:
- updated builder instance
- See Also:
-
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:
trueif logging should be enabled for received packets,falseif 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:
trueif logging should be enabled for sent packets,falseif no logging should be done- See Also:
-
loggerName
Base name of the logger to use when logging receive and send packets. Eithersendorrecvis added as another level depending on log direction.- Returns:
- logger name
-
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 asAuthorization, cookies, and names containingtoken,password,secret, orkeyare 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
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)