- 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 potentialNoClassDefFoundError
's in case any logger API cannot be found on the classpath.- Author:
- Lukas Eder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JooqLogger.Level
Deprecated.- UseLog.Level
instead
-
Constructor Summary
Constructors Constructor Description JooqLogger()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(Object message)
Log a message inDEBUG
level.void
debug(Object message, Object details)
Log a message inDEBUG
level.void
debug(Object message, Object details, Throwable throwable)
Log a message inDEBUG
level.void
debug(Object message, Throwable throwable)
Log a message inDEBUG
level.void
error(Object message)
Log a message inERROR
level.void
error(Object message, Object details)
Log a message inERROR
level.void
error(Object message, Object details, Throwable throwable)
Log a message inERROR
level.void
error(Object message, Throwable throwable)
Log a message inERROR
level.static JooqLogger
getLogger(Class<?> clazz)
Get a logger wrapper for a class.static void
globalThreshold(Log.Level level)
Set a global level threshold to all JooqLoggers.static void
globalThreshold(JooqLogger.Level level)
Set a global level threshold to all JooqLoggers.void
info(Object message)
Log a message inINFO
level.void
info(Object message, Object details)
Log a message inINFO
level.void
info(Object message, Object details, Throwable throwable)
Log a message inINFO
level.void
info(Object message, Throwable throwable)
Log a message inINFO
level.boolean
isDebugEnabled()
Check ifDEBUG
level logging is enabled.boolean
isInfoEnabled()
Check ifINFO
level logging is enabled.boolean
isTraceEnabled()
Check ifTRACE
level logging is enabled.void
trace(Object message)
Log a message inTRACE
level.void
trace(Object message, Object details)
Log a message inTRACE
level.void
trace(Object message, Object details, Throwable throwable)
Log a message inTRACE
level.void
trace(Object message, Throwable throwable)
Log a message inTRACE
level.void
warn(Object message)
Log a message inWARN
level.void
warn(Object message, Object details)
Log a message inWARN
level.void
warn(Object message, Object details, Throwable throwable)
Log a message inWARN
level.void
warn(Object message, Throwable throwable)
Log a message inWARN
level.
-
-
-
Method Detail
-
getLogger
public static JooqLogger getLogger(Class<?> clazz)
Get a logger wrapper for a class.
-
isTraceEnabled
public boolean isTraceEnabled()
Check ifTRACE
level logging is enabled.- Specified by:
isTraceEnabled
in interfaceLog
-
trace
public void trace(Object message)
Log a message inTRACE
level.
-
trace
public void trace(Object message, Object details, Throwable throwable)
Log a message inTRACE
level.
-
isDebugEnabled
public boolean isDebugEnabled()
Check ifDEBUG
level logging is enabled.- Specified by:
isDebugEnabled
in interfaceLog
-
debug
public void debug(Object message)
Log a message inDEBUG
level.
-
debug
public void debug(Object message, Object details, Throwable throwable)
Log a message inDEBUG
level.
-
isInfoEnabled
public boolean isInfoEnabled()
Check ifINFO
level logging is enabled.- Specified by:
isInfoEnabled
in interfaceLog
-
info
public void info(Object message)
Log a message inINFO
level.
-
info
public void info(Object message, Object details, Throwable throwable)
Log a message inINFO
level.
-
warn
public void warn(Object message)
Log a message inWARN
level.
-
warn
public void warn(Object message, Object details, Throwable throwable)
Log a message inWARN
level.
-
error
public void error(Object message)
Log a message inERROR
level.
-
error
public void error(Object message, Object details, Throwable throwable)
Log a message inERROR
level.
-
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.
-
-