io.github.dengchen2020.mybatis.log.MybatisLogOutImpl Maven / Gradle / Ivy
package io.github.dengchen2020.mybatis.log;
import org.apache.ibatis.logging.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Mybatis日志记录实现
*
* @author dengchen
* @since 2022/12/1
*/
public class MybatisLogOutImpl implements Log {
private static final Logger log = LoggerFactory.getLogger(MybatisLogOutImpl.class);
public MybatisLogOutImpl(String clazz) {
log.debug(clazz);
}
public boolean isDebugEnabled() {
return log.isDebugEnabled();
}
public boolean isTraceEnabled() {
return log.isTraceEnabled();
}
public void error(String s, Throwable e) {
log.error("异常信息:{},异常堆栈信息:", s, e);
}
public void error(String s) {
log.error(s);
}
public void debug(String s) {
log.debug(s);
}
public void trace(String s) {
log.trace(s);
}
public void warn(String s) {
log.warn(s);
}
}