Class LoggerAdapterAbstract.FormattedMessage

java.lang.Object
org.spongepowered.asm.logging.LoggerAdapterAbstract.FormattedMessage
Enclosing class:
LoggerAdapterAbstract

public static class LoggerAdapterAbstract.FormattedMessage extends Object
This is a very naive implementation of log4j2's ParameterizedMessage which is less efficient and less defensive because it doesn't need to handle all the cases that the log4j2 formatter does. All we're really doing here is substituting in the values for {} placeholders because I know that in mixin there aren't any cases where we need to handle anything else, such as escaped { characters or whatever. It also handles the case where the last param of the varargs is a Throwable, and makes it available to consumers.
  • Constructor Details

    • FormattedMessage

      public FormattedMessage(String message, Object... params)
      Create a new formatted message
      Parameters:
      message - Message patterm
      params - Message parameters
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMessage

      public String getMessage()
    • hasThrowable

      public boolean hasThrowable()
    • getThrowable

      public Throwable getThrowable()