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 entry
T - The type of your builder
All Implemented Interfaces:
Builder<T,R>, Supplier<R>
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 Details

    • Builder

      protected Builder()
  • Method Details

    • 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