Class LogProperties.Builder

Enclosing interface:
LogProperties

Builder for properties.
  • Method Details

    • fromFunction

      public LogProperties.Builder fromFunction(Function<String, @Nullable String> function)
      Sets what is called on LogProperties.valueOrNull(String).
      Parameters:
      function - valueOrNull func.
      Returns:
      this.
    • fromProperties

      Parses a string as Properties.

      The parameter is the contents of a properties file, not a resource, path, or file name. Passing a name such as "logging.properties" does not load that file; it is parsed as a single key with an empty value.

      Parameters:
      properties - properties content as a string, for example "logging.level=INFO".
      Returns:
      this.
      API Note
      Rainbow Gum core does not read resources from the filesystem or the classpath. If external properties are needed, it is the caller's responsibility to read them into a string (or use a module that does, like rainbowgum-simple-props).
    • fromURIQuery

      Parses a string as a URI query string. If the URI has no query portion then it will be equivalent to empty properties.
      Parameters:
      uri - percent encoded uri with separator as "&" and key value separator of "=".
      Returns:
      this.
    • build

      public LogProperties build()
      Builds LogProperties based on builder config.
      Returns:
      this.