private static String buildMessagePattern(int len) {
        StringBuilder sb = new StringBuilder();
        sb.append(" entry with (");
        for (int i = 0; i < len; i++) {
            sb.append("{}");
            if (i != len - 1)
                sb.append(", ");
        }
        sb.append(')');
        return sb.toString();
    }
Log an exception being caught allowing the log level to be specified.

@param level     the logging level to use.
@param throwable the exception being caught.
slf4j-ext/src/main/java/org/slf4j/ext/XLogger.java