Interface Logger

    • Method Detail

      • debug

        default void debug​(Object msg)
      • debug

        default void debug​(Throwable t)
      • error

        default void error​(Object msg)
      • error

        default void error​(Throwable t)
      • info

        default void info​(Object msg)
      • trace

        default void trace​(Object msg)
      • trace

        default void trace​(Throwable t)
      • warn

        default void warn​(Object msg)
      • isDebug

        default boolean isDebug()
      • isError

        default boolean isError()
      • isInfo

        default boolean isInfo()
      • isTrace

        default boolean isTrace()
      • isWarn

        default boolean isWarn()
      • isLevel

        default boolean isLevel​(int level)
      • log

        default void log​(int level,
                         Object msg)
        Logs a message.
        Parameters:
        level - The level at which the message will be logged. If the current level (given by getLevel() is below this one, no logging is performed.
        msg - The message to log.
      • log

        default void log​(int level,
                         Throwable t)
        Logs an exception.
        Parameters:
        level - The level at which the exception will be logged. If the current level (given by getLevel() is below this one, no logging is performed.
        t - The exception to log.
      • log

        default void log​(int level,
                         Object msg,
                         Throwable t)
        Logs a message with an exception.
        Parameters:
        level - The level at which the information will be logged. If the current level (given by getLevel() is below this one, no logging is performed.
        msg - The message to log.
        t - The exception to log.
      • alwaysLog

        void alwaysLog​(int level,
                       Object msg,
                       Throwable t)
        Logs a message with an exception. This message will always be logged even if its level is above the current level (given by getLevel()).
        Parameters:
        level - The level at which the information will be logged.
        msg - The message to log.
        t - The exception to log.
      • getName

        default String getName()
        Returns the name of this logger.
      • getLevel

        int getLevel()
        Returns the log level of this logger. see LogLevel
      • subLogger

        default Logger subLogger​(String name)
        Creates a sub logger, that forwards the message it gets to this logger. The sub logger will have the same log level as this logger.
      • subLogger

        Logger subLogger​(String name,
                         int level)
        Creates a sub logger, that forwards the message it gets to this logger.
        Parameters:
        name - The name of the sub logger.
        level - The log level of the sub logger.
      • addLogListener

        void addLogListener​(LogListener listener)
        Adds an item to the list of registered listeners.
      • removeLogListener

        void removeLogListener​(LogListener listener)
        Removes an item from the list of registered listeners.
      • notifyListeners

        void notifyListeners​(LogMessage message)
        Broadcasts the given log message to the registered listeners.