Module org.jooq

Class JooqLogger

java.lang.Object
org.jooq.tools.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 Details Link icon

    • JooqLogger Link icon

      @Deprecated public JooqLogger(int limitMessages)
      Deprecated.
      - [#15050] - 3.19.0 - Do not construct your own logger. Use getLogger(Class) methods instead.
  • Method Details Link icon

    • getLogger Link icon

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

      public static JooqLogger getLogger(String name)
      Get a logger wrapper for a class.
    • getLogger Link icon

      public static JooqLogger getLogger(Class<?> clazz, int limitMessages)
      Get a logger wrapper for a class, which logs at most a certain number of messages.
    • getLogger Link icon

      public static JooqLogger getLogger(String name, int limitMessages)
      Get a logger wrapper for a class, which logs at most a certain number of messages.
    • getLogger Link icon

      public static JooqLogger getLogger(Class<?> clazz, String nameSuffix, int limitMessages)
      Get a logger wrapper for a class, which logs at most a certain number of messages.
    • isTraceEnabled Link icon

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

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

      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 Link icon

      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 Link icon

      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 Link icon

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

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

      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 Link icon

      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 Link icon

      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 Link icon

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

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

      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 Link icon

      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 Link icon

      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
    • isWarnEnabled Link icon

      public boolean isWarnEnabled()
      Check if WARN level logging is enabled.
      Specified by:
      isWarnEnabled in interface Log
    • warn Link icon

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

      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 Link icon

      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 Link icon

      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
    • isErrorEnabled Link icon

      public boolean isErrorEnabled()
      Check if ERROR level logging is enabled.
      Specified by:
      isErrorEnabled in interface Log
    • error Link icon

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

      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 Link icon

      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 Link icon

      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
    • log Link icon

      public void log(Log.Level level, Object message)
      Log a message in a given log level.
      Specified by:
      log in interface Log
      Parameters:
      level - The log level
      message - The log message
    • log Link icon

      public void log(Log.Level level, Object message, Object details)
      Log a message in a given log level.
      Specified by:
      log in interface Log
      Parameters:
      level - The log level
      message - The log message
      details - The message details (padded to a constant-width message)
    • log Link icon

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

      public void log(Log.Level level, Object message, Object details, Throwable throwable)
      Log a message in a given log level.
      Specified by:
      log in interface Log
      Parameters:
      level - The log level
      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 Link icon

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

      public static void globalThreshold(Log.Level level)
      Set a global level threshold to all JooqLoggers.
    • initSimpleFormatter Link icon

      public static void initSimpleFormatter()
      [#12405] The common SimpleFormatter format to be set in all of jOOQ's CLIs.