孙肖宁

SpringBoot开启日志
SpringBoot开启日志在SpringBoot的配置文件application.properties文件里加入...
扫描右侧二维码阅读全文
02
2019/04

SpringBoot开启日志

SpringBoot开启日志
在SpringBoot的配置文件application.properties文件里加入以下内容

#com.mycompany.mavenspringboot.controller 日志 WARN级别输出
logging.level.com.univalsoft.api.controller=WARN
#com.mycompany.mavenspringboot.mapper sql日志 DEBUG级别输出
logging.level.com.mycompany.mavenspringboot.mapper=DEBUG

logging.file=logs/spring-boot-logging.log
logging.pattern.console=%d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n
logging.pattern.file=%d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n
Last modification:May 4th, 2019 at 02:05 pm
If you think my article is useful to you, please feel free to appreciate

One comment

  1. 百万链

    有用,感谢博主的分享了。

Leave a Comment