java.lang.Object
org.jooq.tools.JooqLogger
- All Implemented Interfaces:
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
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionJooqLogger
(int limitMessages) Deprecated.- [#15050] - 3.19.0 - Do not construct your own logger. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Log a message inDEBUG
level.void
Log a message inDEBUG
level.void
Log a message inDEBUG
level.void
Log a message inDEBUG
level.void
Log a message inERROR
level.void
Log a message inERROR
level.void
Log a message inERROR
level.void
Log a message inERROR
level.static JooqLogger
Get a logger wrapper for a class.static JooqLogger
Get a logger wrapper for a class, which logs at most a certain number of messages.static JooqLogger
Get a logger wrapper for a class, which logs at most a certain number of messages.static JooqLogger
Get a logger wrapper for a class.static JooqLogger
Get a logger wrapper for a class, which logs at most a certain number of messages.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
Log a message inINFO
level.void
Log a message inINFO
level.void
Log a message inINFO
level.void
Log a message inINFO
level.static void
[#12405] The commonSimpleFormatter
format to be set in all of jOOQ's CLIs.boolean
Check ifDEBUG
level logging is enabled.boolean
Check ifERROR
level logging is enabled.boolean
Check ifINFO
level logging is enabled.boolean
Check ifTRACE
level logging is enabled.boolean
Check ifWARN
level logging is enabled.void
Log a message in a given log level.void
Log a message in a given log level.void
Log a message in a given log level.void
Log a message in a given log level.void
Log a message inTRACE
level.void
Log a message inTRACE
level.void
Log a message inTRACE
level.void
Log a message inTRACE
level.void
Log a message inWARN
level.void
Log a message inWARN
level.void
Log a message inWARN
level.void
Log a message inWARN
level.
-
Constructor Details
-
JooqLogger
Deprecated.- [#15050] - 3.19.0 - Do not construct your own logger. UsegetLogger(Class)
methods instead.
-
-
Method Details
-
getLogger
Get a logger wrapper for a class. -
getLogger
Get a logger wrapper for a class. -
getLogger
Get a logger wrapper for a class, which logs at most a certain number of messages. -
getLogger
Get a logger wrapper for a class, which logs at most a certain number of messages. -
getLogger
Get a logger wrapper for a class, which logs at most a certain number of messages. -
isTraceEnabled
public boolean isTraceEnabled()Check ifTRACE
level logging is enabled.- Specified by:
isTraceEnabled
in interfaceLog
-
trace
Log a message inTRACE
level. -
trace
Log a message inTRACE
level. -
trace
Log a message inTRACE
level. -
trace
Log a message inTRACE
level. -
isDebugEnabled
public boolean isDebugEnabled()Check ifDEBUG
level logging is enabled.- Specified by:
isDebugEnabled
in interfaceLog
-
debug
Log a message inDEBUG
level. -
debug
Log a message inDEBUG
level. -
debug
Log a message inDEBUG
level. -
debug
Log a message inDEBUG
level. -
isInfoEnabled
public boolean isInfoEnabled()Check ifINFO
level logging is enabled.- Specified by:
isInfoEnabled
in interfaceLog
-
info
Log a message inINFO
level. -
info
Log a message inINFO
level. -
info
Log a message inINFO
level. -
info
Log a message inINFO
level. -
isWarnEnabled
public boolean isWarnEnabled()Check ifWARN
level logging is enabled.- Specified by:
isWarnEnabled
in interfaceLog
-
warn
Log a message inWARN
level. -
warn
Log a message inWARN
level. -
warn
Log a message inWARN
level. -
warn
Log a message inWARN
level. -
isErrorEnabled
public boolean isErrorEnabled()Check ifERROR
level logging is enabled.- Specified by:
isErrorEnabled
in interfaceLog
-
error
Log a message inERROR
level. -
error
Log a message inERROR
level. -
error
Log a message inERROR
level. -
error
Log a message inERROR
level. -
log
Log a message in a given log level. -
log
Log a message in a given log level. -
log
Log a message in a given log level. -
log
Log a message in a given log level. -
globalThreshold
Set a global level threshold to all JooqLoggers. -
globalThreshold
Set a global level threshold to all JooqLoggers. -
initSimpleFormatter
public static void initSimpleFormatter()[#12405] The commonSimpleFormatter
format to be set in all of jOOQ's CLIs.
-
Log.Level
instead