public final class JooqLogger extends Object
This logger provides abstraction over the three logger APIs supported optionally by jOOQ. These are (in order of preference):
JooqLogger
tries to instantiate any of the above loggers,
catching potential NoClassDefFoundError
's in case any logger API
cannot be found on the classpath.Modifier and Type | Class and Description |
---|---|
static class |
JooqLogger.Level
The log level.
|
Constructor and Description |
---|
JooqLogger() |
Modifier and Type | Method and Description |
---|---|
void |
debug(Object message)
Log a message in
DEBUG level. |
void |
debug(Object message,
Object details)
Log a message in
DEBUG level. |
void |
debug(Object message,
Object details,
Throwable throwable)
Log a message in
DEBUG level. |
void |
debug(Object message,
Throwable throwable)
Log a message in
DEBUG level. |
void |
error(Object message)
Log a message in
ERROR level. |
void |
error(Object message,
Object details)
Log a message in
ERROR level. |
void |
error(Object message,
Object details,
Throwable throwable)
Log a message in
ERROR level. |
void |
error(Object message,
Throwable throwable)
Log a message in
ERROR level. |
static JooqLogger |
getLogger(Class<?> clazz)
Get a logger wrapper for a class.
|
static void |
globalThreshold(JooqLogger.Level level)
Set a global level threshold to all JooqLoggers.
|
void |
info(Object message)
Log a message in
INFO level. |
void |
info(Object message,
Object details)
Log a message in
INFO level. |
void |
info(Object message,
Object details,
Throwable throwable)
Log a message in
INFO level. |
void |
info(Object message,
Throwable throwable)
Log a message in
INFO level. |
boolean |
isDebugEnabled()
Check if
DEBUG level logging is enabled. |
boolean |
isInfoEnabled()
Check if
INFO level logging is enabled. |
boolean |
isTraceEnabled()
Check if
TRACE level logging is enabled. |
void |
trace(Object message)
Log a message in
TRACE level. |
void |
trace(Object message,
Object details)
Log a message in
TRACE level. |
void |
trace(Object message,
Object details,
Throwable throwable)
Log a message in
TRACE level. |
void |
trace(Object message,
Throwable throwable)
Log a message in
TRACE level. |
void |
warn(Object message)
Log a message in
WARN level. |
void |
warn(Object message,
Object details)
Log a message in
WARN level. |
void |
warn(Object message,
Object details,
Throwable throwable)
Log a message in
WARN level. |
void |
warn(Object message,
Throwable throwable)
Log a message in
WARN level. |
public static JooqLogger getLogger(Class<?> clazz)
public boolean isTraceEnabled()
TRACE
level logging is enabled.public void trace(Object message)
TRACE
level.message
- The log messagepublic void trace(Object message, Object details)
TRACE
level.message
- The log messagedetails
- The message details (padded to a constant-width message)public void trace(Object message, Throwable throwable)
TRACE
level.message
- The log messagethrowable
- An exception whose stacktrace is logged along with the
messagepublic void trace(Object message, Object details, Throwable throwable)
TRACE
level.message
- The log messagedetails
- The message details (padded to a constant-width message)throwable
- An exception whose stacktrace is logged along with the
messagepublic boolean isDebugEnabled()
DEBUG
level logging is enabled.public void debug(Object message)
DEBUG
level.message
- The log messagepublic void debug(Object message, Object details)
DEBUG
level.message
- The log messagedetails
- The message details (padded to a constant-width message)public void debug(Object message, Throwable throwable)
DEBUG
level.message
- The log messagethrowable
- An exception whose stacktrace is logged along with the
messagepublic void debug(Object message, Object details, Throwable throwable)
DEBUG
level.message
- The log messagedetails
- The message details (padded to a constant-width message)throwable
- An exception whose stacktrace is logged along with the
messagepublic boolean isInfoEnabled()
INFO
level logging is enabled.public void info(Object message)
INFO
level.message
- The log messagepublic void info(Object message, Object details)
INFO
level.message
- The log messagedetails
- The message details (padded to a constant-width message)public void info(Object message, Throwable throwable)
INFO
level.message
- The log messagethrowable
- An exception whose stacktrace is logged along with the
messagepublic void info(Object message, Object details, Throwable throwable)
INFO
level.message
- The log messagedetails
- The message details (padded to a constant-width message)throwable
- An exception whose stacktrace is logged along with the
messagepublic void warn(Object message)
WARN
level.message
- The log messagepublic void warn(Object message, Object details)
WARN
level.message
- The log messagedetails
- The message details (padded to a constant-width message)public void warn(Object message, Throwable throwable)
WARN
level.message
- The log messagethrowable
- An exception whose stacktrace is logged along with the
messagepublic void warn(Object message, Object details, Throwable throwable)
WARN
level.message
- The log messagedetails
- The message details (padded to a constant-width message)throwable
- An exception whose stacktrace is logged along with the
messagepublic void error(Object message)
ERROR
level.message
- The log messagepublic void error(Object message, Object details)
ERROR
level.message
- The log messagedetails
- The message details (padded to a constant-width message)public void error(Object message, Throwable throwable)
ERROR
level.message
- The log messagethrowable
- An exception whose stacktrace is logged along with the
messagepublic void error(Object message, Object details, Throwable throwable)
ERROR
level.message
- The log messagedetails
- The message details (padded to a constant-width message)throwable
- An exception whose stacktrace is logged along with the
messagepublic static void globalThreshold(JooqLogger.Level level)
Copyright © 2016. All Rights Reserved.