public class StringFormattedMessage extends Object implements Message
Formatter
.
This class implements the unrolled args API even though StringFormattedMessage does not. This leaves the room for StringFormattedMessage to unroll itself later.
Constructor and Description |
---|
StringFormattedMessage(Locale locale,
String messagePattern,
Object... arguments)
Constructs a message.
|
StringFormattedMessage(String messagePattern,
Object... arguments)
Constructs a message.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
protected String |
formatMessage(String msgPattern,
Object... args) |
String |
getFormat()
Returns the message pattern.
|
String |
getFormattedMessage()
Returns the formatted message.
|
Object[] |
getParameters()
Returns the message parameters.
|
Throwable |
getThrowable()
Return the throwable passed to the Message.
|
int |
hashCode() |
String |
toString() |
public StringFormattedMessage(Locale locale, String messagePattern, Object... arguments)
locale
- the locale for this message formatmessagePattern
- the pattern for this message formatarguments
- The objects to formatpublic StringFormattedMessage(String messagePattern, Object... arguments)
messagePattern
- the pattern for this message formatarguments
- The objects to formatpublic String getFormattedMessage()
getFormattedMessage
in interface Message
public Object[] getParameters()
getParameters
in interface Message
protected String formatMessage(String msgPattern, Object... args)
public Throwable getThrowable()
getThrowable
in interface Message
Copyright © 1999-2021 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.