use of org.jooq.tools.JooqLogger in project jOOQ by jOOQ.
the class BufferedLog method flush.
/**
* Perform the actual logging.
*/
public static synchronized void flush() {
JooqLogger delegate = JooqLogger.getLogger(BufferedLog.class);
if (!messages.isEmpty()) {
delegate.warn("Buffered warning and error messages:");
delegate.warn("------------------------------------");
}
for (Message m : messages) switch(m.level) {
case DEBUG:
delegate.debug(m.message, m.details, m.throwable);
break;
case TRACE:
delegate.trace(m.message, m.details, m.throwable);
break;
case INFO:
delegate.info(m.message, m.details, m.throwable);
break;
case WARN:
delegate.warn(m.message, m.details, m.throwable);
break;
case ERROR:
delegate.error(m.message, m.details, m.throwable);
break;
case FATAL:
delegate.error(m.message, m.details, m.throwable);
break;
}
messages.clear();
}
use of org.jooq.tools.JooqLogger in project jOOQ by jOOQ.
the class BufferedLog method flush.
/**
* Perform the actual logging.
*/
public static synchronized void flush() {
JooqLogger delegate = JooqLogger.getLogger(BufferedLog.class);
if (!messages.isEmpty()) {
delegate.warn("Buffered warning and error messages:");
delegate.warn("------------------------------------");
}
for (Message m : messages) switch(m.level) {
case DEBUG:
delegate.debug(m.message, m.details, m.throwable);
break;
case TRACE:
delegate.trace(m.message, m.details, m.throwable);
break;
case INFO:
delegate.info(m.message, m.details, m.throwable);
break;
case WARN:
delegate.warn(m.message, m.details, m.throwable);
break;
case ERROR:
case FATAL:
delegate.error(m.message, m.details, m.throwable);
break;
}
messages.clear();
}
Aggregations