标签:需要 count res 输出 .com eve ogg file grid
http://www.jquery-bootgrid.com/GettingStarted
日志是生产环境非常重要的配置,在迁移老的工程到spring-boot时日志的设置兼容很重要,以下是自己在配置日志的时候由于不仔细导致的一些问题备注一下
spring boot 默认的日志是console输出,但线上一般都是file输出,所以想修改spring boot的默认输出端
http://docs.spring.io/spring-boot/docs/current/reference/html/howto-logging.html
按照官方文档怎么配置都关闭不掉,console和file都会输出,随后又查看了以下两篇文章
http://stackoverflow.com/questions/31935151/prevent-spring-boot-from-printing-logs-to-console
http://stackoverflow.com/questions/26019350/how-to-disable-logback-consoleappender-in-spring-boot/34852737#34852737
没仔细看的话,还是不好使,最后给spring boot 的github发了issue:
https://github.com/spring-projects/spring-boot/issues/5978
查看了作者的回复,有仔细查看了spring-boot有关logback的文档:
结合之前两篇stackoverflow的文章发现spring-boot的1.3.1以后的defaults.xml和base.xml不一样,base.xml里包含了console的appender,所以不能include base.xml,要include defaults.xml.然后自己定义file的appender,最后配置完成logback.xml后ok
注意:
application.properties
#------------------------
# log
#------------------------
logging.file=account.log
logging.config=classpath:config/logback-spring.xml
|
标签:需要 count res 输出 .com eve ogg file grid
原文地址:http://www.cnblogs.com/softidea/p/6389514.html