Search in sources :

Example 1 with JooqLogger

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();
}
Also used : JooqLogger(org.jooq.tools.JooqLogger)

Example 2 with JooqLogger

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();
}
Also used : JooqLogger(org.jooq.tools.JooqLogger)

Aggregations

JooqLogger (org.jooq.tools.JooqLogger)2