java.lang.Object
io.helidon.webserver.accesslog.AccessLogFeature
- All Implemented Interfaces:
RuntimeType.Api<io.helidon.webserver.accesslog.AccessLogConfig>,NamedService,ServerFeature
public final class AccessLogFeature
extends Object
implements ServerFeature, RuntimeType.Api<io.helidon.webserver.accesslog.AccessLogConfig>
Service that adds support for Access logging to Server.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.spi.ServerFeature
ServerFeature.RoutingBuilders, ServerFeature.ServerFeatureContext, ServerFeature.SocketBuilders -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of theSystem.getLogger(String)used to log access log records. -
Method Summary
Modifier and TypeMethodDescriptionstatic io.helidon.webserver.accesslog.AccessLogConfig.Builderbuilder()A new fluent API builder to create Access log support instance.static AccessLogFeaturecreate()Create Access log support with default configuration.static AccessLogFeatureCreate Access log support configured fromConfig.static AccessLogFeaturecreate(io.helidon.webserver.accesslog.AccessLogConfig config) Create a new instance from its configuration.static AccessLogFeatureCreate a new instance customizing its configuration.name()Name of this implementation, as provided inConfiguredProvider.create(Config, String).io.helidon.webserver.accesslog.AccessLogConfigThe prototype as it was received when creating this runtime object instance.voidsetup(ServerFeature.ServerFeatureContext featureContext) Set up a server feature.type()Type of this implementation, to distinguish instances of same type, with differentNamedService.name().
-
Field Details
-
DEFAULT_LOGGER_NAME
Name of theSystem.getLogger(String)used to log access log records. The message logged contains all information, so the format should be modified to only log the message.- See Also:
-
-
Method Details
-
create
Create Access log support with default configuration.- Returns:
- a new access log support to be registered with WebServer routing
-
create
Create Access log support configured fromConfig.- Parameters:
config- to configure a new access log support instance- Returns:
- a new access log support to be registered with WebServer routing
-
builder
public static io.helidon.webserver.accesslog.AccessLogConfig.Builder builder()A new fluent API builder to create Access log support instance.- Returns:
- a new builder
-
create
Create a new instance from its configuration.- Parameters:
config- configuration- Returns:
- a new feature
-
create
public static AccessLogFeature create(Consumer<io.helidon.webserver.accesslog.AccessLogConfig.Builder> builderConsumer) Create a new instance customizing its configuration.- Parameters:
builderConsumer- consumer of configuration- Returns:
- a new feature
-
setup
Description copied from interface:ServerFeatureSet up a server feature. Server features can modify server configuration, right before the server is created. To access listener configuration, or routing, a list of all listeners is provided.- Specified by:
setupin interfaceServerFeature- Parameters:
featureContext- to access builders of webserver, listeners, and routing
-
prototype
public io.helidon.webserver.accesslog.AccessLogConfig prototype()Description copied from interface:RuntimeType.ApiThe prototype as it was received when creating this runtime object instance.- Specified by:
prototypein interfaceRuntimeType.Api<io.helidon.webserver.accesslog.AccessLogConfig>- Returns:
- prototype object used to create this instance
-
name
Description copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
namein interfaceNamedService- Returns:
- name of this service
-
type
Description copied from interface:NamedServiceType of this implementation, to distinguish instances of same type, with differentNamedService.name(). Use for exampleConfiguredProvider.configKey()to define the type.- Specified by:
typein interfaceNamedService- Returns:
- type of this service
-