Package io.helidon.webserver.accesslog
Class AbstractLogEntry.Builder<R extends AbstractLogEntry,T extends AbstractLogEntry.Builder<R,T>>
java.lang.Object
io.helidon.webserver.accesslog.AbstractLogEntry.Builder<R,T>
- Type Parameters:
R
- The type of your log entryT
- The type of your builder
- Direct Known Subclasses:
HeaderLogEntry.Builder
,HostLogEntry.Builder
,RequestLineLogEntry.Builder
,SizeLogEntry.Builder
,StatusLogEntry.Builder
,TimestampLogEntry.Builder
,TimeTakenLogEntry.Builder
,UserLogEntry.Builder
- Enclosing class:
- AbstractLogEntry
protected abstract static class AbstractLogEntry.Builder<R extends AbstractLogEntry,T extends AbstractLogEntry.Builder<R,T>>
extends Object
implements Builder<T,R>
A fluent API builder for
AbstractLogEntry
.
Extend this class to implement your own log entries.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlPad
(int length) Apply left padding to fill the defined length.maxLength
(int maxLength) Configure maximal length of the output written.noPad()
Apply no padding on the output.rPad
(int length) Apply right padding to fill the defined length.sanitize
(boolean sanitize) Configure output sanitization.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
noPad
Apply no padding on the output. This is the default.- Returns:
- updated builder instance
-
rPad
Apply right padding to fill the defined length. Padding uses spaces. If log entry length is bigger than padding length, log entry is returned as is- Parameters:
length
- length to pad to- Returns:
- updated builder instance
-
lPad
Apply left padding to fill the defined length. Padding uses spaces. If log entry length is bigger than padding length, log entry is returned as is- Parameters:
length
- length to pad to- Returns:
- updated builder instance
-
sanitize
Configure output sanitization. In case the sanitized output differs from original value, the output will be prefixed with an exclamation mark.- Parameters:
sanitize
- whether to sanitize output (for log entries that are based on text from HTTP request).- Returns:
- updated builder instance
-
maxLength
Configure maximal length of the output written. Modified output will be prefixed with an exclamation mark.- Parameters:
maxLength
- maximal length to write- Returns:
- updated builder instance
-