Package io.helidon.webserver.accesslog
Class AbstractLogEntry.Builder<R extends AbstractLogEntry,T extends AbstractLogEntry.Builder<R,?>>
- 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,?>> extends Object implements Builder<R>
A fluent API builder forAbstractLogEntry
. Extend this class to implement your own log entries.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
lPad(int length)
Apply left padding to fill the defined length.T
maxLength(int maxLength)
Configure maximal length of the output written.T
noPad()
Apply no padding on the output.T
rPad(int length)
Apply right padding to fill the defined length.T
sanitize(boolean sanitize)
Configure output sanitization.
-
-
-
Method Detail
-
noPad
public T noPad()
Apply no padding on the output. This is the default.- Returns:
- updated builder instance
-
rPad
public T rPad(int length)
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
public T lPad(int length)
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
public T sanitize(boolean 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
public T maxLength(int 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
-
-