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 message,
Object... params)
Creates
SimpleMessage instances containing the formatted parameterized message string. |
newMessage, newMessage
public static final ParameterizedNoReferenceMessageFactory INSTANCE
public ParameterizedNoReferenceMessageFactory()
public Message newMessage(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...)
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.