Class LoggingEvent

  • Direct Known Subclasses:
    LogEventAdapter

    public class LoggingEvent
    extends java.lang.Object
    No-op version of Log4j 1.2 LoggingEvent. This class is not directly used by Log4j 1.x clients but is used by the Log4j 2 LogEvent adapter to be compatible with Log4j 1.x components.
    • Constructor Detail

      • LoggingEvent

        public LoggingEvent()
    • Method Detail

      • getLocationInformation

        public LocationInfo getLocationInformation()
        Set the location information for this logging event. The collected information is cached for future use.
        Returns:
        Always returns null.
      • getLevel

        public Level getLevel()
        Return the level of this event. Use this form instead of directly accessing the level field.
        Returns:
        Always returns null.
      • getLoggerName

        public java.lang.String getLoggerName()
        Return the name of the logger. Use this form instead of directly accessing the categoryName field.
        Returns:
        Always returns null.
      • getFQNOfLoggerClass

        public java.lang.String getFQNOfLoggerClass()
      • getTimeStamp

        public final long getTimeStamp()
      • getLogger

        public Category getLogger()
        Gets the logger of the event. Use should be restricted to cloning events.
        Returns:
        Always returns null.
        Since:
        1.2.15
      • getMessage

        public java.lang.Object getMessage()
        Return the message for this logging event.

        Before serialization, the returned object is the message passed by the user to generate the logging event. After serialization, the returned value equals the String form of the message possibly after object rendering.

        Returns:
        Always returns null.
        Since:
        1.1
      • getNDC

        public java.lang.String getNDC()
      • getMDC

        public java.lang.Object getMDC​(java.lang.String key)
      • getMDCCopy

        public void getMDCCopy()
        Obtain a copy of this thread's MDC prior to serialization or asynchronous logging.
      • getRenderedMessage

        public java.lang.String getRenderedMessage()
      • getStartTime

        public static long getStartTime()
        Returns the time when the application started, in milliseconds elapsed since 01.01.1970.
        Returns:
        the JVM start time.
      • getThreadName

        public java.lang.String getThreadName()
      • getThrowableInformation

        public ThrowableInformation getThrowableInformation()
        Returns the throwable information contained within this event. May be null if there is no such information.

        Note that the Throwable object contained within a ThrowableInformation does not survive serialization.

        Returns:
        Always returns null.
        Since:
        1.1
      • getThrowableStrRep

        public java.lang.String[] getThrowableStrRep()
        Return this event's throwable's string[] representaion.
        Returns:
        Always returns null.
      • setProperty

        public void setProperty​(java.lang.String propName,
                                java.lang.String propValue)
      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
      • getPropertyKeySet

        public java.util.Set getPropertyKeySet()
      • getProperties

        public java.util.Map getProperties()
      • removeProperty

        public java.lang.Object removeProperty​(java.lang.String propName)