首页  

mybatis 日志实现要点     所属分类 mybatis 浏览量 624
org.apache.ibatis.logging.Log
org.apache.ibatis.logging.LogFactory

public static synchronized void useLog4JLogging() {
    setImplementation(Log4jImpl.class);
}
按顺序尝试使用以下日志系统
tryImplementation(LogFactory::useSlf4jLogging);
tryImplementation(LogFactory::useCommonsLogging);
tryImplementation(LogFactory::useLog4J2Logging);
tryImplementation(LogFactory::useLog4JLogging);
tryImplementation(LogFactory::useJdkLogging);
tryImplementation(LogFactory::useNoLogging);


debug 输出sql日志
控制台输出 
LogFactory.useStdOutLogging();
Logging initialized using 'class org.apache.ibatis.logging.stdout.StdOutImpl' adapter.



org.apache.ibatis.logging.jdbc
BaseJdbcLogger
ConnectionLogger
PreparedStatementLogger
ResultSetLogger
StatementLogger


public final class ConnectionLogger extends BaseJdbcLogger implements InvocationHandler {

JDK 动态代理

上一篇     下一篇
MybatisPlus简介

MybatisPlus QueryWrapper LambdaQueryWrapper LambdaQueryChainWrapper

mybatis plus 常用注解

Aviator使用说明

Java注解实例

idea 设置异常断点