Package org.apache.logging.log4j.message
Class ObjectArrayMessage
- java.lang.Object
-
- org.apache.logging.log4j.message.ObjectArrayMessage
-
- All Implemented Interfaces:
Serializable,Message
public final class ObjectArrayMessage extends 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(Object... obj)Creates the ObjectMessage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetFormat()Returns the object formatted using its toString method.StringgetFormattedMessage()Returns the formatted object message.Object[]getParameters()Returns the object as if it were a parameter.ThrowablegetThrowable()Returns null.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
ObjectArrayMessage
public ObjectArrayMessage(Object... obj)
Creates the ObjectMessage.- Parameters:
obj- The Object to format.
-
-
Method Detail
-
getFormat
public String getFormat()
Returns the object formatted using its toString method.
-
getFormattedMessage
public String getFormattedMessage()
Returns the formatted object message.- Specified by:
getFormattedMessagein interfaceMessage- Returns:
- the formatted object message.
-
getParameters
public Object[] getParameters()
Returns the object as if it were a parameter.- Specified by:
getParametersin interfaceMessage- Returns:
- The object.
-
getThrowable
public Throwable getThrowable()
Returns null.- Specified by:
getThrowablein interfaceMessage- Returns:
- null.
-
-