Class LoggerAdapterAbstract.FormattedMessage

  • Enclosing class:
    LoggerAdapterAbstract

    public static class LoggerAdapterAbstract.FormattedMessage
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      FormattedMessage​(java.lang.String message, java.lang.Object... params)
      Create a new formatted message
    • Constructor Detail

      • FormattedMessage

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

      • toString

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

        public java.lang.String getMessage()
      • hasThrowable

        public boolean hasThrowable()
      • getThrowable

        public java.lang.Throwable getThrowable()