时间:2021-07-01 10:21:17 帮助过:201人阅读
最后输出日志
22:25:42,179 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [java.sql.PreparedStatement] to DEBUG
22:25:42,179 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [java.sql.ResultSet] to DEBUG
22:25:42,179 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
22:25:42,179 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[ROOT]
22:25:42,180 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [cn.iautos.manager]. Did you define it below instead of above in the configuration file?
22:25:42,180 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See http://logback.qos.ch/codes.html#appender_order for more details.
22:25:42,180 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [com.ibatis]. Did you define it below instead of above in the configuration file?
22:25:42,180 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See http://logback.qos.ch/codes.html#appender_order for more details.
22:25:42,180 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [rollingFile] to Logger[ROOT]
22:25:42,180 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
22:25:42,181 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@7d417077 - Registering current configuration as safe fallback point
22:25:42.649 [main] DEBUG mapper.UserMapperI.getUser - ==> Preparing: select * from users where id=?
22:25:42.704 [main] DEBUG mapper.UserMapperI.getUser - ==> Parameters: 1(Integer)
22:25:42.742 [main] DEBUG mapper.UserMapperI.getUser - <== Total: 1
User{id=‘1‘, name=‘test‘, action=‘test‘}
最近在项目中添加日志
如果是spring boot项目的话:
只要在application.properties里面加上
logging.level.com.你的包名=true。就ok
slf4j + logback 输出日志:mybatis sql语句
标签:detail manage src filename 配置文件 classic root rom could