Package org.apache.commons.jcs3.log
Class MessageFormatter
java.lang.Object
org.apache.commons.jcs3.log.MessageFormatter
Handles messages that consist of a format string conforming to
 java.text.MessageFormat. (Borrowed from log4j2)
- 
Constructor SummaryConstructorsConstructorDescriptionMessageFormatter(String messagePattern, Object... parameters) Constructs a message formatter.MessageFormatter(String messagePattern, Supplier<?>... paramSuppliers) Constructs a message formatter.
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringformatMessage(String msgPattern, Object... args) Returns the formatted message.Return the throwable passed to the Message.booleanReturn true, if the parameters list contains a Throwable.toString()
- 
Constructor Details- 
MessageFormatterConstructs a message formatter.- Parameters:
- messagePattern- the pattern for this message format
- parameters- The objects to format
 
- 
MessageFormatterConstructs a message formatter.- Parameters:
- messagePattern- the pattern for this message format
- paramSuppliers- An array of functions, which when called, produce the desired log message parameters.
 
 
- 
- 
Method Details- 
getFormattedMessageReturns the formatted message.- Returns:
- the formatted message.
 
- 
formatMessage
- 
toString
- 
getThrowableReturn the throwable passed to the Message.- Returns:
- the Throwable.
 
- 
hasThrowableReturn true, if the parameters list contains a Throwable.- Returns:
- true, if the parameters list contains a Throwable.
 
 
-