Class StatusConsoleListener

    • Constructor Detail

      • StatusConsoleListener

        public StatusConsoleListener​(Level level)
        Constructs a StatusConsoleListener instance writing to System.out using the supplied level.
        Parameters:
        level - the level of status messages that should appear on the console
        Throws:
        NullPointerException - on null level
      • StatusConsoleListener

        public StatusConsoleListener​(Level level,
                                     PrintStream stream)
        Constructs a StatusConsoleListener instance using the supplied level and stream.

        Make sure not to use a logger stream of some sort to avoid creating an infinite loop of indirection!

        Parameters:
        level - the level of status messages that should appear on the console
        stream - the stream to write to
        Throws:
        NullPointerException - on null level or stream
    • Method Detail

      • setLevel

        public void setLevel​(Level level)
        Sets the level to a new value.
        Parameters:
        level - The new Level.
      • getStatusLevel

        public Level getStatusLevel()
        Return the Log Level for which the Listener should receive events.
        Specified by:
        getStatusLevel in interface StatusListener
        Returns:
        the Log Level.
      • log

        public void log​(StatusData data)
        Writes status messages to the console.
        Specified by:
        log in interface StatusListener
        Parameters:
        data - The StatusData.
      • setFilters

        public void setFilters​(String... filters)
        Adds package name filters to exclude.
        Parameters:
        filters - An array of package names to exclude.