io.github.afezeria.freedao.classic.runtime.LogHelper Maven / Gradle / Ivy
package io.github.afezeria.freedao.classic.runtime;
import org.slf4j.Logger;
import java.util.List;
import java.util.StringTokenizer;
/**
*/
public class LogHelper {
public static void logSql(Logger logger, String sql) {
StringTokenizer tokenizer = new StringTokenizer(sql);
StringBuilder builder = new StringBuilder();
boolean hasMoreTokens = tokenizer.hasMoreTokens();
while (hasMoreTokens) {
builder.append(tokenizer.nextToken());
hasMoreTokens = tokenizer.hasMoreTokens();
if (hasMoreTokens) {
builder.append(' ');
}
}
logger.debug("==> Preparing: {}", builder);
}
public static void logArgs(Logger logger, List