how to configure log4j for Mybatis to print my SQL

前端 未结 3 1963
有刺的猬
有刺的猬 2021-02-05 12:24

My project is set up with SpringMVC+Mybatis+EXTJS4. This is my configuration:

# Rules reminder:
# DEBUG < INFO < WARN < ERROR < FATAL

# Global loggi         


        
3条回答
  •  长发绾君心
    2021-02-05 12:43

    I encountered a similar problem. The following code helped me (i've used it in the mybatis class configuration):

    org.apache.ibatis.logging.LogFactory.useLog4JLogging(); 
    

    May cause problems become other logging system in your classpath.

提交回复
热议问题