Class ReusableLogEventFactory

    • Constructor Detail

      • ReusableLogEventFactory

        public ReusableLogEventFactory()
    • Method Detail

      • createEvent

        public LogEvent createEvent​(String loggerName,
                                    Marker marker,
                                    String fqcn,
                                    Level level,
                                    Message message,
                                    List<Property> properties,
                                    Throwable t)
        Creates a log event.
        Specified by:
        createEvent in interface LogEventFactory
        Parameters:
        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.
        Returns:
        The LogEvent.
      • createEvent

        public LogEvent createEvent​(String loggerName,
                                    Marker marker,
                                    String fqcn,
                                    StackTraceElement location,
                                    Level level,
                                    Message message,
                                    List<Property> properties,
                                    Throwable t)
        Creates a log event.
        Specified by:
        createEvent in interface LocationAwareLogEventFactory
        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 caller.
        level - The event Level.
        message - The Message.
        properties - Properties to be added to the log event.
        t - An optional Throwable.
        Returns:
        The LogEvent.
      • release

        public static void release​(LogEvent logEvent)
        Switches the 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.
        Parameters:
        logEvent - the log event to make available again
        Since:
        2.7