[jOOQ/jOOQ#9506] Mute LoggerListener::exception in some cases
This commit is contained in:
parent
7177c64c9d
commit
f575623ecf
@ -426,7 +426,11 @@ final class MigrationImpl extends AbstractScope implements Migration {
|
||||
|
||||
// [#8301] Find a better way to test if our table already exists
|
||||
try {
|
||||
historyCtx.fetchExists(HISTORY);
|
||||
Configuration c = historyCtx
|
||||
.configuration()
|
||||
.derive();
|
||||
c.data("org.jooq.tools.LoggerListener.exception.mute", true);
|
||||
c.dsl().fetchExists(HISTORY);
|
||||
return true;
|
||||
}
|
||||
catch (DataAccessException ignore) {}
|
||||
|
||||
@ -236,7 +236,10 @@ public class LoggerListener implements ExecuteListener {
|
||||
|
||||
@Override
|
||||
public void exception(ExecuteContext ctx) {
|
||||
if (log.isDebugEnabled())
|
||||
|
||||
// [#9506] An internal, undocumented flag that allows for muting exception logging of
|
||||
// "expected" exceptions.
|
||||
if (log.isDebugEnabled() && ctx.configuration().data("org.jooq.tools.LoggerListener.exception.mute") == null)
|
||||
log.debug("Exception", ctx.exception());
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user