Class AbstractLogger

    • Constructor Detail

      • AbstractLogger

        public AbstractLogger​(LogLevel level)
        Parameters:
        level - the logging level above which the logger will log
      • AbstractLogger

        public AbstractLogger()
        Default logging level is WARN.
    • Method Detail

      • setLevel

        public void setLevel​(LogLevel level)
        Specified by:
        setLevel in interface Logger
        Parameters:
        level - the logging level above which the logger will log
      • getLevel

        public LogLevel getLevel()
        Specified by:
        getLevel in interface Logger
        Returns:
        the logging level above which the logger will log
      • warn

        public void warn​(String message,
                         String category)
        Logger warning messages.
        Specified by:
        warn in interface Logger
        Parameters:
        message - the message to log
        category - the log category (usually this is the full name of the class being logged but it can be anything)
      • info

        public void info​(String message,
                         String category)
        Logger informational messages.
        Specified by:
        info in interface Logger
        Parameters:
        message - the message to log
        category - the log category (usually this is the full name of the class being logged but it can be anything)
      • debug

        public void debug​(String message,
                          String category)
        Logger debug messages.
        Specified by:
        debug in interface Logger
        Parameters:
        message - the message to log
        category - the log category (usually this is the full name of the class being logged but it can be anything)
      • doLog

        protected abstract void doLog​(LogLevel level,
                                      String message,
                                      String category)
        Common method for all severity levels.
        Parameters:
        level - the log level (aka severity) of the message
        message - the message to log
        category - the log category