org.apache.logging.log4j.message

Class MessageFormatMessage

    • Constructor Detail

      • MessageFormatMessage

        public MessageFormatMessage(Locale locale,
                                    String messagePattern,
                                    Object... parameters)
        Constructs a message.
        Parameters:
        locale - the locale for this message format
        messagePattern - the pattern for this message format
        parameters - The objects to format
        Since:
        2.6
      • MessageFormatMessage

        public MessageFormatMessage(String messagePattern,
                                    Object... parameters)
        Constructs a message.
        Parameters:
        messagePattern - the pattern for this message format
        parameters - The objects to format
    • Method Detail

      • getFormattedMessage

        public String getFormattedMessage()
        Returns the formatted message.
        Specified by:
        getFormattedMessage in interface Message
        Returns:
        the formatted message.
      • getFormat

        public String getFormat()
        Returns the message pattern.
        Specified by:
        getFormat in interface Message
        Returns:
        the message pattern.
      • getParameters

        public Object[] getParameters()
        Returns the message parameters.
        Specified by:
        getParameters in interface Message
        Returns:
        the message parameters.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getThrowable

        public Throwable getThrowable()
        Return the throwable passed to the Message.
        Specified by:
        getThrowable in interface Message
        Returns:
        the Throwable.

Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.