java.lang.Object
io.helidon.webserver.accesslog.AbstractLogEntry
- All Implemented Interfaces:
AccessLogEntry
- Direct Known Subclasses:
HeaderLogEntry
,HostLogEntry
,RequestLineLogEntry
,SizeLogEntry
,StatusLogEntry
,TimestampLogEntry
,TimeTakenLogEntry
,UserLogEntry
Common log entry features.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
AbstractLogEntry.Builder<R extends AbstractLogEntry,
T extends AbstractLogEntry.Builder<R, T>> A fluent API builder forAbstractLogEntry
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default limit for the number of characters written.Fields inherited from interface io.helidon.webserver.accesslog.AccessLogEntry
NOT_AVAILABLE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractLogEntry
(AbstractLogEntry.Builder<?, ?> builder) Create a new instance using a builder. -
Method Summary
Modifier and TypeMethodDescriptionapply
(AccessLogContext context) Apply the log entry, adds padding to the log entry and then callsdoApply(AccessLogContext)
.protected abstract String
doApply
(AccessLogContext context) Apply the "raw" log entry.protected String
Apply maximal length limitation.protected String
Apply configured padding.protected String
Apply configured sanitization.
-
Field Details
-
DEFAULT_MAX_LENGTH
public static final int DEFAULT_MAX_LENGTHDefault limit for the number of characters written.- See Also:
-
-
Constructor Details
-
AbstractLogEntry
Create a new instance using a builder.- Parameters:
builder
- builder that extendsAbstractLogEntry.Builder
-
-
Method Details
-
apply
Apply the log entry, adds padding to the log entry and then callsdoApply(AccessLogContext)
.- Specified by:
apply
in interfaceAccessLogEntry
- Parameters:
context
- context with access to information useful for access log entries- Returns:
- formatted log entry
-
maxLength
Apply maximal length limitation.- Parameters:
toLimit
- sanitized string- Returns:
- shortened string
-
sanitize
Apply configured sanitization.- Parameters:
toSanitize
- string to sanitize- Returns:
- sanitized string
-
pad
Apply configured padding.- Parameters:
toPad
- string to pad- Returns:
- padded string
-
doApply
Apply the "raw" log entry. The result will go through common formatting, such as padding if configured.- Parameters:
context
- context with access to information useful for access log entries- Returns:
- log entry
- See Also:
-