Package org.apache.logging.log4j.message
Class ObjectArrayMessage
- java.lang.Object
-
- org.apache.logging.log4j.message.ObjectArrayMessage
-
- All Implemented Interfaces:
java.io.Serializable,Message
public final class ObjectArrayMessage extends java.lang.Object implements Message
Handles messages that contain an Object[].Created for use with the CSV layout. For example:
logger.debug(new ObjectArrayMessage(1, 2, "Bob"));- Since:
- 2.4
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjectArrayMessage(java.lang.Object... obj)Creates the ObjectMessage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetFormat()Returns the object formatted using its toString method.java.lang.StringgetFormattedMessage()Returns the formatted object message.java.lang.Object[]getParameters()Returns the object as if it were a parameter.java.lang.ThrowablegetThrowable()Returns null.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
getFormat
public java.lang.String getFormat()
Returns the object formatted using its toString method.
-
getFormattedMessage
public java.lang.String getFormattedMessage()
Returns the formatted object message.- Specified by:
getFormattedMessagein interfaceMessage- Returns:
- the formatted object message.
-
getParameters
public java.lang.Object[] getParameters()
Returns the object as if it were a parameter.- Specified by:
getParametersin interfaceMessage- Returns:
- The object.
-
getThrowable
public java.lang.Throwable getThrowable()
Returns null.- Specified by:
getThrowablein interfaceMessage- Returns:
- null.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-