Class DefaultLogEventFactory
- java.lang.Object
-
- org.apache.logging.log4j.core.impl.DefaultLogEventFactory
-
- All Implemented Interfaces:
LocationAwareLogEventFactory,LogEventFactory
public class DefaultLogEventFactory extends java.lang.Object implements LogEventFactory, LocationAwareLogEventFactory
Always creates new LogEvent instances.
-
-
Field Summary
Fields Modifier and Type Field Description private static DefaultLogEventFactoryinstance
-
Constructor Summary
Constructors Constructor Description DefaultLogEventFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LogEventcreateEvent(java.lang.String loggerName, Marker marker, java.lang.String fqcn, java.lang.StackTraceElement location, Level level, Message data, java.util.List<Property> properties, java.lang.Throwable t)Creates a log event.LogEventcreateEvent(java.lang.String loggerName, Marker marker, java.lang.String fqcn, Level level, Message data, java.util.List<Property> properties, java.lang.Throwable t)Creates a log event.static DefaultLogEventFactorygetInstance()
-
-
-
Field Detail
-
instance
private static final DefaultLogEventFactory instance
-
-
Method Detail
-
getInstance
public static DefaultLogEventFactory getInstance()
-
createEvent
public LogEvent createEvent(java.lang.String loggerName, Marker marker, java.lang.String fqcn, Level level, Message data, java.util.List<Property> properties, java.lang.Throwable t)
Creates a log event.- Specified by:
createEventin interfaceLogEventFactory- Parameters:
loggerName- The name of the Logger.marker- An optional Marker.fqcn- The fully qualified class name of the caller.level- The event Level.data- The Message.properties- Properties to be added to the log event.t- An optional Throwable.- Returns:
- The LogEvent.
-
createEvent
public LogEvent createEvent(java.lang.String loggerName, Marker marker, java.lang.String fqcn, java.lang.StackTraceElement location, Level level, Message data, java.util.List<Property> properties, java.lang.Throwable t)
Creates a log event.- Specified by:
createEventin interfaceLocationAwareLogEventFactory- Specified by:
createEventin interfaceLogEventFactory- Parameters:
loggerName- The name of the Logger.marker- An optional Marker.fqcn- The fully qualified class name of the caller.location- The location of the callerlevel- The event Level.data- The Message.properties- Properties to be added to the log event.t- An optional Throwable.- Returns:
- The LogEvent.
-
-