public class ReusableLogEventFactory extends Object implements LogEventFactory, LocationAwareLogEventFactory
Constructor and Description |
---|
ReusableLogEventFactory() |
Modifier and Type | Method and Description |
---|---|
LogEvent |
createEvent(String loggerName,
org.apache.logging.log4j.Marker marker,
String fqcn,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.message.Message message,
List<Property> properties,
Throwable t)
Creates a log event.
|
LogEvent |
createEvent(String loggerName,
org.apache.logging.log4j.Marker marker,
String fqcn,
StackTraceElement location,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.message.Message message,
List<Property> properties,
Throwable t)
Creates a log event.
|
static void |
release(LogEvent logEvent)
Switches the
reserved flag off if the specified event is a MutableLogEvent, otherwise does nothing. |
public ReusableLogEventFactory()
public LogEvent createEvent(String loggerName, org.apache.logging.log4j.Marker marker, String fqcn, org.apache.logging.log4j.Level level, org.apache.logging.log4j.message.Message message, List<Property> properties, Throwable t)
createEvent
in interface LogEventFactory
loggerName
- The name of the Logger.marker
- An optional Marker.fqcn
- The fully qualified class name of the caller.level
- The event Level.message
- The Message.properties
- Properties to be added to the log event.t
- An optional Throwable.public LogEvent createEvent(String loggerName, org.apache.logging.log4j.Marker marker, String fqcn, StackTraceElement location, org.apache.logging.log4j.Level level, org.apache.logging.log4j.message.Message message, List<Property> properties, Throwable t)
createEvent
in interface LocationAwareLogEventFactory
createEvent
in interface LogEventFactory
loggerName
- The name of the Logger.marker
- An optional Marker.fqcn
- The fully qualified class name of the caller.location
- The location of the caller.level
- The event Level.message
- The Message.properties
- Properties to be added to the log event.t
- An optional Throwable.public static void release(LogEvent logEvent)
reserved
flag off if the specified event is a MutableLogEvent, otherwise does nothing.
This flag is used internally to verify that a reusable log event is no longer in use and can be reused.logEvent
- the log event to make available againCopyright © 1999-2021 The 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.