Interface Logger


  • public interface Logger

    Interface for a logger

    Since:
    1.0
    Author:
    Oliver Krauss, Andreas Pointner
    • Method Detail

      • getInstance

        static Logger getInstance​(Object objectForClazz)
        Returns a logger instance
        Parameters:
        objectForClazz - the object for which the class object is extracted
        Returns:
        the logger instance
      • getInstance

        static Logger getInstance​(Class<?> clazz)
        Returns a logger instance
        Parameters:
        clazz - the class object that is used for logging
        Returns:
        the logger instance
      • log

        default void log​(LogLevel level,
                         Object object)
        Logs the given object by using toString method
        Parameters:
        level - of log
        object - object to be logged
      • log

        void log​(LogLevel level,
                 String s)
        Logs the given string
        Parameters:
        level - of log
        s - message to be logged
      • log

        void log​(LogLevel level,
                 String s,
                 Exception e)
        Logs the given string with an exception
        Parameters:
        level - of log
        s - message to be logged
        e - error to be logged
      • log

        void log​(LogLevel level,
                 Exception e)
        Logs the given exception
        Parameters:
        level - of log
        e - error to be logged
      • log

        void log​(LogLevel level,
                 String s,
                 Object... replacements)
        Log the given string, and replaces every "{}" with the correct replacements
        Parameters:
        level - of level
        s - message to be logged
        replacements - replacement values for {}
      • trace

        default void trace​(Object o)
        Logs the given object with LogLevel.TRACE
        Parameters:
        o - object to be logged
      • trace

        default void trace​(String s)
        Logs the given string with LogLevel.TRACE
        Parameters:
        s - message to be logged
      • trace

        default void trace​(Exception e)
        Logs the given exception with LogLevel.TRACE
        Parameters:
        e - error to be logged
      • trace

        default void trace​(String s,
                           Exception e)
        Logs the given string with an exception with LogLevel.TRACE
        Parameters:
        s - message to be logged
        e - error to be logged
      • trace

        default void trace​(String s,
                           Object... replacements)
        Log the given string, and replaces every "{}" with the correct replacements with LogLevel.TRACE
        Parameters:
        s - message to be logged
        replacements - replacement values for {}
      • debug

        default void debug​(Object o)
        Logs the given object with LogLevel.DEBUG
        Parameters:
        o - object to be logged
      • debug

        default void debug​(String s)
        Logs the given string with LogLevel.DEBUG
        Parameters:
        s - message to be logged
      • debug

        default void debug​(Exception e)
        Logs the given exception with LogLevel.DEBUG
        Parameters:
        e - error to be logged
      • debug

        default void debug​(String s,
                           Exception e)
        Logs the given string with an exception with LogLevel.DEBUG
        Parameters:
        s - message to be logged
        e - error to be logged
      • debug

        default void debug​(String s,
                           Object... replacements)
        Log the given string, and replaces every "{}" with the correct replacements with LogLevel.DEBUG
        Parameters:
        s - message to be logged
        replacements - replacement values for {}
      • info

        default void info​(Object o)
        Logs the given object with LogLevel.INFO
        Parameters:
        o - object to be logged
      • info

        default void info​(String s)
        Logs the given string with LogLevel.INFO
        Parameters:
        s - message to be logged
      • info

        default void info​(Exception e)
        Logs the given exception with LogLevel.INFO
        Parameters:
        e - error to be logged
      • info

        default void info​(String s,
                          Exception e)
        Logs the given string with an exception with LogLevel.INFO
        Parameters:
        s - message to be logged
        e - error to be logged
      • info

        default void info​(String s,
                          Object... replacements)
        Log the given string, and replaces every "{}" with the correct replacements with LogLevel.INFO
        Parameters:
        s - message to be logged
        replacements - replacement values for {}
      • warn

        default void warn​(Object o)
        Logs the given object with LogLevel.WARN
        Parameters:
        o - object to be logged
      • warn

        default void warn​(String s)
        Logs the given string with LogLevel.WARN
        Parameters:
        s - message to be logged
      • warn

        default void warn​(Exception e)
        Logs the given exception with LogLevel.WARN
        Parameters:
        e - error to be logged
      • warn

        default void warn​(String s,
                          Exception e)
        Logs the given string with an exception with LogLevel.WARN
        Parameters:
        s - message to be logged
        e - error to be logged
      • warn

        default void warn​(String s,
                          Object... replacements)
        Log the given string, and replaces every "{}" with the correct replacements with LogLevel.WARN
        Parameters:
        s - message to be logged
        replacements - replacement values for {}
      • error

        default void error​(Object o)
        Logs the given object with LogLevel.ERROR
        Parameters:
        o - object to be logged
      • error

        default void error​(String s)
        Logs the given string with LogLevel.ERROR
        Parameters:
        s - message to be logged
      • error

        default void error​(Exception e)
        Logs the given exception with LogLevel.ERROR
        Parameters:
        e - error to be logged
      • error

        default void error​(String s,
                           Exception e)
        Logs the given string with an exception with LogLevel.ERROR
        Parameters:
        s - message to be logged
        e - error to be logged
      • error

        default void error​(String s,
                           Object... replacements)
        Log the given string, and replaces every "{}" with the correct replacements with LogLevel.ERROR
        Parameters:
        s - message to be logged
        replacements - replacement values for {}