Class Logger.Builder<B extends Logger.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
Logger

public static class Logger.Builder<B extends Logger.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public Logger build()
      Finish building the Logger object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Logger.
      Overrides:
      build in class GObject.Builder<B extends Logger.Builder<B>>
      Returns:
      a new instance of Logger with the properties that were set in the Builder object.
    • setLevel

      public B setLevel(LoggerLogLevel level)
      The level of logging output.
      Parameters:
      level - the value for the level property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMaxBodySize

      public B setMaxBodySize(int maxBodySize)
      If Logger:level is LoggerLogLevel.BODY, this gives the maximum number of bytes of the body that will be logged. (-1 means "no limit".)
      Parameters:
      maxBodySize - the value for the max-body-size property
      Returns:
      the Builder instance is returned, to allow method chaining