|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.message.FormattedMessage
public class FormattedMessage
Handles messages that contain a format String. Dynamically determines if the format conforms to MessageFormat or String.format and if not then uses ParameterizedMessage to format.
Constructor Summary | |
---|---|
FormattedMessage(String messagePattern,
Object arg)
Constructor with a pattern and a single parameter. |
|
FormattedMessage(String messagePattern,
Object[] arguments)
|
|
FormattedMessage(String messagePattern,
Object[] arguments,
Throwable throwable)
|
|
FormattedMessage(String messagePattern,
Object arg1,
Object arg2)
Constructor with a pattern and two parameters. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getFormat()
Returns the message pattern. |
String |
getFormattedMessage()
Returns the formatted message. |
protected Message |
getMessage(String msgPattern,
Object[] args,
Throwable throwable)
|
Object[] |
getParameters()
Returns the message parameters. |
Throwable |
getThrowable()
Always returns null. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FormattedMessage(String messagePattern, Object[] arguments, Throwable throwable)
public FormattedMessage(String messagePattern, Object[] arguments)
public FormattedMessage(String messagePattern, Object arg)
messagePattern
- The message pattern.arg
- The parameter.public FormattedMessage(String messagePattern, Object arg1, Object arg2)
messagePattern
- The message pattern.arg1
- The first parameter.arg2
- The second parameter.Method Detail |
---|
public String getFormattedMessage()
getFormattedMessage
in interface Message
public String getFormat()
getFormat
in interface Message
public Object[] getParameters()
getParameters
in interface Message
protected Message getMessage(String msgPattern, Object[] args, Throwable throwable)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public Throwable getThrowable()
getThrowable
in interface Message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2015 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.