Interface LogBuilder


public interface LogBuilder
Interface for constructing log events before logging them. Instances of LogBuilders should only be created by calling one of the Logger methods that return a LogBuilder.
  • Field Details

    • NOOP

      static final LogBuilder NOOP
      NOOP Logbuilder
  • Method Details

    • withMarker

      default LogBuilder withMarker(Marker marker)
      Includes a Marker in the log event. Interface default method does nothing.
      Parameters:
      marker - The Marker to log.
      Returns:
      The LogBuilder.
    • withThrowable

      default LogBuilder withThrowable(Throwable throwable)
      Includes a Throwable in the log event. Interface default method does nothing.
      Parameters:
      throwable - The Throwable to log.
      Returns:
      the LogBuilder.
    • withLocation

      default LogBuilder withLocation()
      An implementation will calculate the caller's stack frame and include it in the log event. Interface default method does nothing.
      Returns:
      The LogBuilder.
    • withLocation

      default LogBuilder withLocation(StackTraceElement location)
      Adds the specified stack trace element to the log event. Interface default method does nothing.
      Parameters:
      location - The stack trace element to include in the log event.
      Returns:
      The LogBuilder.
    • log

      default void log(CharSequence message)
      Causes all the data collected to be logged along with the message. Interface default method does nothing.
      Parameters:
      message - The message to log.
    • log

      default void log(String message)
      Causes all the data collected to be logged along with the message. Interface default method does nothing.
      Parameters:
      message - The message to log.
    • log

      default void log(String message, Object... params)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      params - parameters to the message.
      See Also:
    • log

      default void log(String message, Supplier<?>... params)
      Causes all the data collected to be logged along with the message and parameters. Interface default method does nothing.
      Parameters:
      message - The message.
      params - Parameters to the message.
    • log

      default void log(Message message)
      Causes all the data collected to be logged along with the message. Interface default method does nothing.
      Parameters:
      message - The message to log.
    • log

      default void log(Supplier<Message> messageSupplier)
      Causes all the data collected to be logged along with the message. Interface default method does nothing.
      Parameters:
      messageSupplier - The supplier of the message to log.
    • logAndGet

      default Message logAndGet(Supplier<Message> messageSupplier)
      Causes all the data collected to be logged along with the message.
      Parameters:
      messageSupplier - The supplier of the message to log.
      Returns:
      the message logger or null if no logging occurred.
      Since:
      2.20
    • log

      default void log(Object message)
      Causes all the data collected to be logged along with the message. Interface default method does nothing.
      Parameters:
      message - The message to log.
    • log

      default void log(String message, Object p0)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1, Object p2)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      p2 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1, Object p2, Object p3)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      p2 - parameter to the message.
      p3 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      p2 - parameter to the message.
      p3 - parameter to the message.
      p4 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      p2 - parameter to the message.
      p3 - parameter to the message.
      p4 - parameter to the message.
      p5 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6)
      Logs a message with parameters.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      p2 - parameter to the message.
      p3 - parameter to the message.
      p4 - parameter to the message.
      p5 - parameter to the message.
      p6 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      p2 - parameter to the message.
      p3 - parameter to the message.
      p4 - parameter to the message.
      p5 - parameter to the message.
      p6 - parameter to the message.
      p7 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      p2 - parameter to the message.
      p3 - parameter to the message.
      p4 - parameter to the message.
      p5 - parameter to the message.
      p6 - parameter to the message.
      p7 - parameter to the message.
      p8 - parameter to the message.
      See Also:
    • log

      default void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9)
      Logs a message with parameters. Interface default method does nothing.
      Parameters:
      message - the message to log; the format depends on the message factory.
      p0 - parameter to the message.
      p1 - parameter to the message.
      p2 - parameter to the message.
      p3 - parameter to the message.
      p4 - parameter to the message.
      p5 - parameter to the message.
      p6 - parameter to the message.
      p7 - parameter to the message.
      p8 - parameter to the message.
      p9 - parameter to the message.
      See Also:
    • log

      default void log()
      Causes all the data collected to be logged. Default implementatoin does nothing.