Package io.helidon.webserver.accesslog
Class AccessLogConfig.BuilderBase.AccessLogConfigImpl
java.lang.Object
io.helidon.webserver.accesslog.AccessLogConfig.BuilderBase.AccessLogConfigImpl
- All Implemented Interfaces:
Prototype.Api,Prototype.Factory<AccessLogFeature>,AccessLogConfig,Supplier<AccessLogFeature>
- Enclosing class:
AccessLogConfig.BuilderBase<BUILDER extends AccessLogConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends AccessLogConfig>
protected static class AccessLogConfig.BuilderBase.AccessLogConfigImpl
extends Object
implements AccessLogConfig, Supplier<AccessLogFeature>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.accesslog.AccessLogConfig
AccessLogConfig.Builder, AccessLogConfig.BuilderBase<BUILDER extends AccessLogConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends AccessLogConfig> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<AccessLogEntry> Common log format, seeAccessLogConfig.BuilderBase.commonLogFormat().static final List<AccessLogEntry> Helidon log format, seeAccessLogConfig.BuilderBase.defaultLogFormat(). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAccessLogConfigImpl(AccessLogConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new instance of the runtime type from this config object.clock()Configure an alternative clock to use, such asClock.fixed(java.time.Instant, java.time.ZoneId).booleanenabled()Whether this feature will be enabled.entries()Configured log entries.booleanformat()The format for log entries (similar to the ApacheLogFormat).get()inthashCode()Name of the logger used to obtain access log logger fromSystem.getLogger(String).name()Name of this instance.sockets()List of sockets to register this feature on.toString()doubleweight()Weight of the access log feature.
-
Field Details
-
COMMON_FORMAT
Common log format, seeAccessLogConfig.BuilderBase.commonLogFormat(). -
HELIDON_FORMAT
Helidon log format, seeAccessLogConfig.BuilderBase.defaultLogFormat().
-
-
Constructor Details
-
AccessLogConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.FactoryCreate a new instance of the runtime type from this config object.- Specified by:
buildin interfacePrototype.Factory<AccessLogFeature>- Returns:
- new configured runtime instance
-
get
- Specified by:
getin interfaceSupplier<AccessLogFeature>
-
entries
Description copied from interface:AccessLogConfigConfigured log entries. If both entries andAccessLogConfig.format()are defined,AccessLogConfig.format()is used.- Specified by:
entriesin interfaceAccessLogConfig- Returns:
- list of access log entries
-
clock
Description copied from interface:AccessLogConfigConfigure an alternative clock to use, such asClock.fixed(java.time.Instant, java.time.ZoneId). Defaults toClock.systemDefaultZone().- Specified by:
clockin interfaceAccessLogConfig- Returns:
- clock to use to get current times
-
loggerName
Description copied from interface:AccessLogConfigName of the logger used to obtain access log logger fromSystem.getLogger(String). Defaults to "io.helidon.webserver.AccessLog".- Specified by:
loggerNamein interfaceAccessLogConfig- Returns:
- name of the logger to use
-
weight
public double weight()Description copied from interface:AccessLogConfigWeight of the access log feature. We need to log access for anything happening on the server, so weight is high: 1000.0.- Specified by:
weightin interfaceAccessLogConfig- Returns:
- weight of the feature
-
sockets
Description copied from interface:AccessLogConfigList of sockets to register this feature on. If empty, it would get registered on all sockets. The logger used will have the expected logger with a suffix of the socket name.- Specified by:
socketsin interfaceAccessLogConfig- Returns:
- socket names to register on, defaults to empty (all available sockets)
-
name
Description copied from interface:AccessLogConfigName of this instance.- Specified by:
namein interfaceAccessLogConfig- Returns:
- instance name
-
format
Description copied from interface:AccessLogConfigThe format for log entries (similar to the ApacheLogFormat).Log format elements %h IP address of the remote host HostLogEntry%l The client identity. This is always undefined in Helidon. UserIdLogEntry%u User ID as asserted by Helidon Security. UserLogEntry%t The timestamp TimestampLogEntry%r The request line ( "GET /favicon.ico HTTP/1.0")RequestLineLogEntry%s The status code returned to the client StatusLogEntry%b The entity size in bytes SizeLogEntry%D The time taken in microseconds (start of request until last byte written) TimeTakenLogEntry%T The time taken in seconds (start of request until last byte written), integer TimeTakenLogEntry%{header-name}i Value of header header-nameHeaderLogEntry- Specified by:
formatin interfaceAccessLogConfig- Returns:
- format string, such as
%h %l %u %t %r %b %{Referer}i
-
enabled
public boolean enabled()Description copied from interface:AccessLogConfigWhether this feature will be enabled.- Specified by:
enabledin interfaceAccessLogConfig- Returns:
- whether enabled
-
toString
-
equals
-
hashCode
public int hashCode()
-