Module org.jooq

Class JooqLogger

  • All Implemented Interfaces:
    Log

    public final class JooqLogger
    extends Object
    implements Log
    The jOOQ logger abstraction.

    This logger provides abstraction over the three logger APIs supported optionally by jOOQ. These are (in order of preference):

    • slf4j
    • log4j
    • jav.util.logging
    JooqLogger tries to instantiate any of the above loggers, catching potential NoClassDefFoundError's in case any logger API cannot be found on the classpath.
    Author:
    Lukas Eder
    • Constructor Detail

      • JooqLogger

        public JooqLogger()
    • Method Detail

      • getLogger

        public static JooqLogger getLogger​(Class<?> clazz)
        Get a logger wrapper for a class.
      • isTraceEnabled

        public boolean isTraceEnabled()
        Check if TRACE level logging is enabled.
        Specified by:
        isTraceEnabled in interface Log
      • trace

        public void trace​(Object message)
        Log a message in TRACE level.
        Specified by:
        trace in interface Log
        Parameters:
        message - The log message
      • trace

        public void trace​(Object message,
                          Object details)
        Log a message in TRACE level.
        Specified by:
        trace in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
      • trace

        public void trace​(Object message,
                          Throwable throwable)
        Log a message in TRACE level.
        Specified by:
        trace in interface Log
        Parameters:
        message - The log message
        throwable - An exception whose stacktrace is logged along with the message
      • trace

        public void trace​(Object message,
                          Object details,
                          Throwable throwable)
        Log a message in TRACE level.
        Specified by:
        trace in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
        throwable - An exception whose stacktrace is logged along with the message
      • isDebugEnabled

        public boolean isDebugEnabled()
        Check if DEBUG level logging is enabled.
        Specified by:
        isDebugEnabled in interface Log
      • debug

        public void debug​(Object message)
        Log a message in DEBUG level.
        Specified by:
        debug in interface Log
        Parameters:
        message - The log message
      • debug

        public void debug​(Object message,
                          Object details)
        Log a message in DEBUG level.
        Specified by:
        debug in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
      • debug

        public void debug​(Object message,
                          Throwable throwable)
        Log a message in DEBUG level.
        Specified by:
        debug in interface Log
        Parameters:
        message - The log message
        throwable - An exception whose stacktrace is logged along with the message
      • debug

        public void debug​(Object message,
                          Object details,
                          Throwable throwable)
        Log a message in DEBUG level.
        Specified by:
        debug in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
        throwable - An exception whose stacktrace is logged along with the message
      • isInfoEnabled

        public boolean isInfoEnabled()
        Check if INFO level logging is enabled.
        Specified by:
        isInfoEnabled in interface Log
      • info

        public void info​(Object message)
        Log a message in INFO level.
        Specified by:
        info in interface Log
        Parameters:
        message - The log message
      • info

        public void info​(Object message,
                         Object details)
        Log a message in INFO level.
        Specified by:
        info in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
      • info

        public void info​(Object message,
                         Throwable throwable)
        Log a message in INFO level.
        Specified by:
        info in interface Log
        Parameters:
        message - The log message
        throwable - An exception whose stacktrace is logged along with the message
      • info

        public void info​(Object message,
                         Object details,
                         Throwable throwable)
        Log a message in INFO level.
        Specified by:
        info in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
        throwable - An exception whose stacktrace is logged along with the message
      • warn

        public void warn​(Object message)
        Log a message in WARN level.
        Specified by:
        warn in interface Log
        Parameters:
        message - The log message
      • warn

        public void warn​(Object message,
                         Object details)
        Log a message in WARN level.
        Specified by:
        warn in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
      • warn

        public void warn​(Object message,
                         Throwable throwable)
        Log a message in WARN level.
        Specified by:
        warn in interface Log
        Parameters:
        message - The log message
        throwable - An exception whose stacktrace is logged along with the message
      • warn

        public void warn​(Object message,
                         Object details,
                         Throwable throwable)
        Log a message in WARN level.
        Specified by:
        warn in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
        throwable - An exception whose stacktrace is logged along with the message
      • error

        public void error​(Object message)
        Log a message in ERROR level.
        Specified by:
        error in interface Log
        Parameters:
        message - The log message
      • error

        public void error​(Object message,
                          Object details)
        Log a message in ERROR level.
        Specified by:
        error in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
      • error

        public void error​(Object message,
                          Throwable throwable)
        Log a message in ERROR level.
        Specified by:
        error in interface Log
        Parameters:
        message - The log message
        throwable - An exception whose stacktrace is logged along with the message
      • error

        public void error​(Object message,
                          Object details,
                          Throwable throwable)
        Log a message in ERROR level.
        Specified by:
        error in interface Log
        Parameters:
        message - The log message
        details - The message details (padded to a constant-width message)
        throwable - An exception whose stacktrace is logged along with the message
      • globalThreshold

        public static void globalThreshold​(JooqLogger.Level level)
        Set a global level threshold to all JooqLoggers.
      • globalThreshold

        public static void globalThreshold​(Log.Level level)
        Set a global level threshold to all JooqLoggers.