Class ParameterizedNoReferenceMessageFactory

All Implemented Interfaces:
Serializable, MessageFactory, MessageFactory2

public final class ParameterizedNoReferenceMessageFactory extends AbstractMessageFactory
Creates FormattedMessage instances for MessageFactory2 methods (and MessageFactory by extension.)

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.

Note to implementors:

This class does not implement any MessageFactory2 methods and lets the superclass funnel those calls through newMessage(String, Object...).

See Also:
  • Field Details

  • Constructor Details

    • ParameterizedNoReferenceMessageFactory

      public ParameterizedNoReferenceMessageFactory()
      Constructs a message factory with default flow strings.
  • Method Details