public final class MementoMessage extends Object implements org.apache.logging.log4j.message.Message, org.apache.logging.log4j.util.StringBuilderFormattable
MementoMessage
is intended to be used when we need to make an
immutable copy of a Message
without forgetting the original
Message.getFormat()
and Message.getParameters()
values.Constructor and Description |
---|
MementoMessage(String formattedMessage,
String format,
Object[] parameters) |
Modifier and Type | Method and Description |
---|---|
void |
formatTo(StringBuilder buffer) |
String |
getFormat() |
String |
getFormattedMessage() |
Object[] |
getParameters() |
Throwable |
getThrowable()
Always returns null.
|
String |
toString() |
public MementoMessage(String formattedMessage, String format, Object[] parameters)
public String getFormattedMessage()
getFormattedMessage
in interface org.apache.logging.log4j.message.Message
public String getFormat()
getFormat
in interface org.apache.logging.log4j.message.Message
public Object[] getParameters()
getParameters
in interface org.apache.logging.log4j.message.Message
public Throwable getThrowable()
getThrowable
in interface org.apache.logging.log4j.message.Message
public void formatTo(StringBuilder buffer)
formatTo
in interface org.apache.logging.log4j.util.StringBuilderFormattable
Copyright © 1999-2020 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.