Class HybrisLoggingEvent


  • public class HybrisLoggingEvent
    extends java.lang.Object
    Extended version of the LoggingEvent class to allow modifying of the message field and to manage the deny flag. Since 6.0 it no longer extends LoggingEvent class due to log4j2 migration.
    • Constructor Summary

      Constructors 
      Constructor Description
      HybrisLoggingEvent​(java.lang.String fqnOfCategoryClass, org.apache.log4j.Category logger, org.apache.log4j.Level level, java.lang.Object message, java.lang.Throwable throwable)
      Creates a new logging event similar to LoggingEvent.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deny()
      Sets the deny flag and therefore the event will not be logged anymore.
      java.lang.String getFQNOfLoggerClass()  
      org.apache.log4j.Level getLevel()  
      org.apache.log4j.Category getLogger()  
      java.lang.Object getMessage()  
      java.lang.String getRenderedMessage()  
      java.lang.Throwable getThrowable()  
      boolean isDenied()
      Checks the deny flag.
      void setMessage​(java.lang.Object message)
      Sets a new message for this event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HybrisLoggingEvent

        public HybrisLoggingEvent​(java.lang.String fqnOfCategoryClass,
                                  org.apache.log4j.Category logger,
                                  org.apache.log4j.Level level,
                                  java.lang.Object message,
                                  java.lang.Throwable throwable)
        Creates a new logging event similar to LoggingEvent. Resets the deny flag.
        Parameters:
        fqnOfCategoryClass - Fully qualified name of the calling category class.
        logger - The logger generating this event.
        level - The level of this event.
        message - The message of this event.
        throwable - The throwable of this event.
    • Method Detail

      • deny

        public void deny()
        Sets the deny flag and therefore the event will not be logged anymore.
      • isDenied

        public boolean isDenied()
        Checks the deny flag.
        Returns:
        true if the event is denied and will not be logged, false otherwise
      • getMessage

        public java.lang.Object getMessage()
      • setMessage

        public void setMessage​(java.lang.Object message)
        Sets a new message for this event.
        Parameters:
        message - new message
      • getRenderedMessage

        public java.lang.String getRenderedMessage()
      • getLevel

        public org.apache.log4j.Level getLevel()
      • getFQNOfLoggerClass

        public java.lang.String getFQNOfLoggerClass()
      • getLogger

        public org.apache.log4j.Category getLogger()
      • getThrowable

        public java.lang.Throwable getThrowable()