public final class ParameterizedNoReferenceMessageFactory extends AbstractMessageFactory
ParameterizedMessageFactory that creates
SimpleMessage objects that do not retain a reference to the parameter object.
Intended for use by the StatusLogger: this logger retains a queue of recently logged messages in memory, causing memory leaks in web applications. (LOG4J2-1176)
This class is immutable.
| Modifier and Type | Field and Description |
|---|---|
static ParameterizedNoReferenceMessageFactory |
INSTANCE
Instance of ParameterizedStatusMessageFactory.
|
| Constructor and Description |
|---|
ParameterizedNoReferenceMessageFactory()
|
| Modifier and Type | Method and Description |
|---|---|
Message |
newMessage(String
Creates
SimpleMessage instances containing the formatted parameterized message string.
|
newMessage, newMessagepublic static final ParameterizedNoReferenceMessageFactoryINSTANCE
public ParameterizedNoReferenceMessageFactory()
public MessagenewMessage(String message, Object ... params)
SimpleMessage instances containing the formatted parameterized message string.
newMessage in interface
MessageFactory
newMessage in class
AbstractMessageFactory
message - The message pattern.
params - The message parameters.
MessageFactory.newMessage(String, Object...)