net.ttddyy.dsproxy.support.SLF4JLogUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datasource-proxy Show documentation
Show all versions of datasource-proxy Show documentation
Provide a datasource proxy that can inject your own logic into all queries.
package net.ttddyy.dsproxy.support;
import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel;
import org.slf4j.Logger;
/**
* @author Tadaya Tsuyukubo
*/
public class SLF4JLogUtils {
public static void writeLog(Logger logger, SLF4JLogLevel logLevel, String message) {
switch (logLevel) {
case DEBUG:
logger.debug(message);
break;
case ERROR:
logger.error(message);
break;
case INFO:
logger.info(message);
break;
case TRACE:
logger.trace(message);
break;
case WARN:
logger.warn(message);
break;
}
}
}