Class LoggingFilter

    • Field Detail

      • name

        private final java.lang.String name
        The logger name
      • logger

        private final org.slf4j.Logger logger
        The logger
      • exceptionCaughtLevel

        private LogLevel exceptionCaughtLevel
        The log level for the exceptionCaught event. Default to WARN.
      • messageSentLevel

        private LogLevel messageSentLevel
        The log level for the messageSent event. Default to INFO.
      • messageReceivedLevel

        private LogLevel messageReceivedLevel
        The log level for the messageReceived event. Default to INFO.
      • sessionCreatedLevel

        private LogLevel sessionCreatedLevel
        The log level for the sessionCreated event. Default to INFO.
      • sessionOpenedLevel

        private LogLevel sessionOpenedLevel
        The log level for the sessionOpened event. Default to INFO.
      • sessionIdleLevel

        private LogLevel sessionIdleLevel
        The log level for the sessionIdle event. Default to INFO.
      • sessionClosedLevel

        private LogLevel sessionClosedLevel
        The log level for the sessionClosed event. Default to INFO.
    • Constructor Detail

      • LoggingFilter

        public LoggingFilter()
        Default Constructor.
      • LoggingFilter

        public LoggingFilter​(java.lang.Class<?> clazz)
        Create a new NoopFilter using a class name
        Parameters:
        clazz - the cass which name will be used to create the logger
      • LoggingFilter

        public LoggingFilter​(java.lang.String name)
        Create a new NoopFilter using a name
        Parameters:
        name - the name used to create the logger. If null, will default to "NoopFilter"
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns:
        The logger's name
      • log

        private void log​(LogLevel eventLevel,
                         java.lang.String message,
                         java.lang.Throwable cause)
        Log if the logger and the current event log level are compatible. We log a message and an exception.
        Parameters:
        eventLevel - the event log level as requested by the user
        message - the message to log
        cause - the exception cause to log
      • log

        private void log​(LogLevel eventLevel,
                         java.lang.String message,
                         java.lang.Object param)
        Log if the logger and the current event log level are compatible. We log a formated message and its parameters.
        Parameters:
        eventLevel - the event log level as requested by the user
        message - the formated message to log
        param - the parameter injected into the message
      • log

        private void log​(LogLevel eventLevel,
                         java.lang.String message)
        Log if the logger and the current event log level are compatible. We log a simple message.
        Parameters:
        eventLevel - the event log level as requested by the user
        message - the message to log
      • setExceptionCaughtLogLevel

        public void setExceptionCaughtLogLevel​(LogLevel level)
        Set the LogLevel for the ExceptionCaught event.
        Parameters:
        level - The LogLevel to set
      • getExceptionCaughtLogLevel

        public LogLevel getExceptionCaughtLogLevel()
        Get the LogLevel for the ExceptionCaught event.
        Returns:
        The LogLevel for the ExceptionCaught eventType
      • setMessageReceivedLogLevel

        public void setMessageReceivedLogLevel​(LogLevel level)
        Set the LogLevel for the MessageReceived event.
        Parameters:
        level - The LogLevel to set
      • getMessageReceivedLogLevel

        public LogLevel getMessageReceivedLogLevel()
        Get the LogLevel for the MessageReceived event.
        Returns:
        The LogLevel for the MessageReceived eventType
      • setMessageSentLogLevel

        public void setMessageSentLogLevel​(LogLevel level)
        Set the LogLevel for the MessageSent event.
        Parameters:
        level - The LogLevel to set
      • getMessageSentLogLevel

        public LogLevel getMessageSentLogLevel()
        Get the LogLevel for the MessageSent event.
        Returns:
        The LogLevel for the MessageSent eventType
      • setSessionCreatedLogLevel

        public void setSessionCreatedLogLevel​(LogLevel level)
        Set the LogLevel for the SessionCreated event.
        Parameters:
        level - The LogLevel to set
      • getSessionCreatedLogLevel

        public LogLevel getSessionCreatedLogLevel()
        Get the LogLevel for the SessionCreated event.
        Returns:
        The LogLevel for the SessionCreated eventType
      • setSessionOpenedLogLevel

        public void setSessionOpenedLogLevel​(LogLevel level)
        Set the LogLevel for the SessionOpened event.
        Parameters:
        level - The LogLevel to set
      • getSessionOpenedLogLevel

        public LogLevel getSessionOpenedLogLevel()
        Get the LogLevel for the SessionOpened event.
        Returns:
        The LogLevel for the SessionOpened eventType
      • setSessionIdleLogLevel

        public void setSessionIdleLogLevel​(LogLevel level)
        Set the LogLevel for the SessionIdle event.
        Parameters:
        level - The LogLevel to set
      • getSessionIdleLogLevel

        public LogLevel getSessionIdleLogLevel()
        Get the LogLevel for the SessionIdle event.
        Returns:
        The LogLevel for the SessionIdle eventType
      • setSessionClosedLogLevel

        public void setSessionClosedLogLevel​(LogLevel level)
        Set the LogLevel for the SessionClosed event.
        Parameters:
        level - The LogLevel to set
      • getSessionClosedLogLevel

        public LogLevel getSessionClosedLogLevel()
        Get the LogLevel for the SessionClosed event.
        Returns:
        The LogLevel for the SessionClosed eventType