Class TestLogger

    • Method Detail

      • clearAll

        public void clearAll()
        Removes ALL LoggingEvents logged on this logger, regardless of thread, and resets the enabled levels of the logger to Level.enablableValueSet() for ALL threads.
      • getLoggingEvents

        public com.google.common.collect.ImmutableList<LoggingEvent> getLoggingEvents()
        Returns:
        all LoggingEvents logged on this logger by this thread
      • getAllLoggingEvents

        public com.google.common.collect.ImmutableList<LoggingEvent> getAllLoggingEvents()
        Returns:
        all LoggingEvents logged on this logger by ANY thread
      • isTraceEnabled

        public boolean isTraceEnabled()
        Specified by:
        isTraceEnabled in interface Logger
        Returns:
        whether this logger is trace enabled in this thread
      • trace

        public void trace​(String message)
        Specified by:
        trace in interface Logger
      • isDebugEnabled

        public boolean isDebugEnabled()
        Specified by:
        isDebugEnabled in interface Logger
        Returns:
        whether this logger is debug enabled in this thread
      • debug

        public void debug​(String message)
        Specified by:
        debug in interface Logger
      • isInfoEnabled

        public boolean isInfoEnabled()
        Specified by:
        isInfoEnabled in interface Logger
        Returns:
        whether this logger is info enabled in this thread
      • info

        public void info​(String message)
        Specified by:
        info in interface Logger
      • isWarnEnabled

        public boolean isWarnEnabled()
        Specified by:
        isWarnEnabled in interface Logger
        Returns:
        whether this logger is warn enabled in this thread
      • warn

        public void warn​(String message)
        Specified by:
        warn in interface Logger
      • isErrorEnabled

        public boolean isErrorEnabled()
        Specified by:
        isErrorEnabled in interface Logger
        Returns:
        whether this logger is error enabled in this thread
      • error

        public void error​(String message)
        Specified by:
        error in interface Logger
      • getEnabledLevels

        public com.google.common.collect.ImmutableSet<Level> getEnabledLevels()
        Returns:
        the set of levels enabled for this logger on this thread
      • setEnabledLevels

        public void setEnabledLevels​(com.google.common.collect.ImmutableSet<Level> enabledLevels)
        The conventional hierarchical notion of Levels, where info being enabled implies warn and error being enabled, is not a requirement of the SLF4J API, so all levels you wish to enable must be passed explicitly to this method. If you wish to use traditional hierarchical setups you may conveniently do so by using the constants in ConventionalLevelHierarchy
        Parameters:
        enabledLevels - levels which will be considered enabled for this logger IN THIS THREAD; does not affect enabled levels for this logger in other threads
      • setEnabledLevels

        public void setEnabledLevels​(Level... enabledLevels)
        The conventional hierarchical notion of Levels, where info being enabled implies warn and error being enabled, is not a requirement of the SLF4J API, so all levels you wish to enable must be passed explicitly to this method. If you wish to use traditional hierarchical setups you may conveniently do so by passing the constants in ConventionalLevelHierarchy to setEnabledLevels(ImmutableSet)
        Parameters:
        enabledLevels - levels which will be considered enabled for this logger IN THIS THREAD; does not affect enabled levels for this logger in other threads
      • setEnabledLevelsForAllThreads

        public void setEnabledLevelsForAllThreads​(com.google.common.collect.ImmutableSet<Level> enabledLevelsForAllThreads)
        The conventional hierarchical notion of Levels, where info being enabled implies warn and error being enabled, is not a requirement of the SLF4J API, so all levels you wish to enable must be passed explicitly to this method. If you wish to use traditional hierarchical setups you may conveniently do so by using the constants in ConventionalLevelHierarchy
        Parameters:
        enabledLevelsForAllThreads - levels which will be considered enabled for this logger IN ALL THREADS
      • setEnabledLevelsForAllThreads

        public void setEnabledLevelsForAllThreads​(Level... enabledLevelsForAllThreads)
        The conventional hierarchical notion of Levels, where info being enabled implies warn and error being enabled, is not a requirement of the SLF4J API, so all levels you wish to enable must be passed explicitly to this method. If you wish to use traditional hierarchical setups you may conveniently do so by passing the constants in ConventionalLevelHierarchy to setEnabledLevelsForAllThreads(ImmutableSet)
        Parameters:
        enabledLevelsForAllThreads - levels which will be considered enabled for this logger IN ALL THREADS