springboot 设置指定包的日志级别


application.yml

logging:
  level:
    com.example.demo.dao : debug

 

********************************************

控制台输出:

 

2019-09-16 11:26:29.977 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.dao.BookMapper.selectByPrimaryKey  : ==>  Preparing: SELECT id,name,create_time,update_time FROM book WHERE id = ? 
2019-09-16 11:26:30.000 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.dao.BookMapper.selectByPrimaryKey  : ==> Parameters: 1(Integer)
2019-09-16 11:26:30.014 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.dao.BookMapper.selectByPrimaryKey  : <==      Total: 1
2019-09-16 11:26:30.026 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.d.B.updateByPrimaryKeySelective    : ==>  Preparing: UPDATE book SET name = ?,create_time = ? WHERE id = ? 
2019-09-16 11:26:30.028 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.d.B.updateByPrimaryKeySelective    : ==> Parameters: hzw6(String), 2019-09-16 10:57:53.921431(Timestamp), 1(Integer)
2019-09-16 11:26:30.030 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.d.B.updateByPrimaryKeySelective    : <==    Updates: 1
2019-09-16 11:26:30.030 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.dao.BookMapper.selectByPrimaryKey  : ==>  Preparing: SELECT id,name,create_time,update_time FROM book WHERE id = ? 
2019-09-16 11:26:30.031 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.dao.BookMapper.selectByPrimaryKey  : ==> Parameters: 1(Integer)
2019-09-16 11:26:30.032 DEBUG 16908 --- [nio-8080-exec-1] c.e.d.dao.BookMapper.selectByPrimaryKey  : <==      Total: 1

 

你可能感兴趣的:(日志级别设置,日志级别设置)