新版博客编辑界面超级难受,考虑转战其他平台,比如博客园!!!

目录

■前言

■原因

■解决

■·SpringBoot源代码分析

2.1.6中,springboot的源码

2.3.10中,springboot的源码


■前言

·SpringBoot版本升级之后,log文件无法显示。

■原因

2.2.0版本之后,log的key变成了

logging.file.name

之前是

logging.file

■解决

application.properties或者application.yml文件中

loggingfile

loggingfilename

■·SpringBoot源代码分析

2.1.6中,springboot的源码

---

package org.springframework.boot.logging;import java.util.Properties;import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertyResolver;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;/*** A reference to a log output file. Log output files are specified using* {@code logging.file} or {@code logging.path} {@link Environment} properties. If the* {@code logging.file} property is not specified {@code "spring.log"} will be written in* the {@code logging.path} directory.** @author Phillip Webb* @since 1.2.1* @see #get(PropertyResolver)*/
public class LogFile {/*** The name of the Spring property that contains the name of the log file. Names can* be an exact location or relative to the current directory.*/public static final String FILE_PROPERTY = "logging.file";/*** The name of the Spring property that contains the directory where log files are* written.*/public static final String PATH_PROPERTY = "logging.path";private final String file;private final String path;

---

2.3.10中,springboot的源码

---

package org.springframework.boot.logging;import java.io.File;
import java.util.Properties;import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertyResolver;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;/*** A reference to a log output file. Log output files are specified using* {@code logging.file.name} or {@code logging.file.path} {@link Environment} properties.* If the {@code logging.file.name} property is not specified {@code "spring.log"} will be* written in the {@code logging.file.path} directory.** @author Phillip Webb* @author Christian Carriere-Tisseur* @since 1.2.1* @see #get(PropertyResolver)*/
public class LogFile {/*** The name of the Spring property that contains the name of the log file. Names can* be an exact location or relative to the current directory.* @since 2.2.0*/public static final String FILE_NAME_PROPERTY = "logging.file.name";/*** The name of the Spring property that contains the directory where log files are* written.* @since 2.2.0*/public static final String FILE_PATH_PROPERTY = "logging.file.path";private final String file;private final String path;

---

Springboot,log文件配置时,logging.file.name与logging.file相关推荐

  1. yml配置oracle连接,springboot yml 文件配置oracle,提示账号密码错误

    最近使用Spring boot,本来一直连接的是mysql数据库,一直没问题.昨天在更换了oracle数据库后,一直提示账号密码不正确,登录被拒绝.检查多次,检查账号密码一切正常,但就是连接不上ora ...

  2. gdb: coredump文件打开时提示 is truncated: expected core file size >= 1000, found: 500

    这个错误就是说,期望coredump文件是1000,但是只读到500. 如果出现这个错误是否还可以继续调试debug呢? Reading symbols from /bin/abc.elf-done. ...

  3. springboot 默认日志配置以及更换其他日志配置

    springboot 默认日志配置 最简单的打印Sql日志 方法一 此方法无需改动直接复制即可使用 #打印SQL mybatis.configuration.log-impl=org.apache.i ...

  4. SpringBoot与日志配置

    前言: 前文我们介绍了配置文件的原理还有如果切换配置文件的环境,个人觉得归纳为一手册,要用的时候查一下就好了.不然记那么多挺麻烦的.. 1.日志 1.日志框架 老生常谈,什么是日志:我们平时用Syst ...

  5. Log4j文件配置教程大全

    Log4j文件配置教程大全~ Log4J的配置文件(Configuration File)就是用来设置记录器的级别.存放器和布局的,它可接key=value格式的设置或xml格式的设置信息.通过配置, ...

  6. 自学SpringBoot之国际化配置相关的坑

    前两天在b站上自学SpringBoot的国际化配置时,浏览器总是报乱码的错,类似??login.tip_zh_CN??, 由于b站上基本都是使用Ideal,我用的是sts2.2.5版本,难免遇到不同, ...

  7. 获取log文件信息,并保存至Excel文件

    获取log文件信息,并保存至Excel文件 日常工作中,可能需要我们从txt文件中截取海量的信息,只要寻找到这种信息的规律或者定位好信息情况,在我的txt文件中有海量的信息,而我只需要截取09/11/ ...

  8. Django配置uwsgi时log文件报错thunder lock: disabled (you can enable it with --thunder-lock)

    一.问题来源 使用uwsgi --ini mysite.ini命令启动后使用ps -aux | grep uwsgi命令查询uwsgi的相关进程,但是查询不到,发现只有下面一个进程,说明uwsgi启动 ...

  9. SpringBoot通过yml和xml文件配置日志输出

    SpringBoot中默认使用Logback进行日志输出,可以同时使用通过logback的配置文件logback.xml或是SpringBoot框架的配置文件application.yml进行配置. ...

最新文章

  1. 韩磊老师与C#编程风格
  2. LinkedIn公司采用超大规模数据中心设计
  3. gitlab bash_如何编写Bash一线式以克隆和管理GitHub和GitLab存储库
  4. 公司打卡少几秒分析--学会拒绝,学会选择
  5. 魔兽世界服务器修改模型,《魔兽世界》魔兽世界修改模型攻略
  6. ZedGraph例子
  7. c语言字符串逆序输出reverse,将一个字符串逆序输出
  8. 基于python的百度离线地图下载器
  9. Matplotlib学习笔记——画三维图
  10. 【前端静态资源托管库-CDN】BootCDN资源全线失效
  11. 龙果支付 mysql_龙果支付系统怎么搭建与部署?
  12. Linux普通用户su root权限的开启和禁止
  13. python复数的实部和虚部都是整数嘛_数字类型
  14. 蓝桥杯实验4--按键之独立键盘(proteus仿真)
  15. 探索Java中empty()与isEmpty()的区别
  16. 小米平板4能装Linux系统吗,还在考虑小米平板4要不要入手?看完这十个问题你就有答案了...
  17. 大数据与云计算学习计划 (一) 云计算系统管理 6 Linux中RPM软件包管理操作 、 Yum软件包仓库操作(概念与实操)
  18. Android-Emulator
  19. 愿随命运颠沛流离——《孤儿列车》读后感
  20. 3.2.1对英文考察2

热门文章

  1. keepalived mysql双主架构图_MySQL数据库架构和同步复制流程
  2. shell 按文件每行长度排序
  3. ejb3.0 中数据库的配置
  4. VIM查看空格,换行,TAB键
  5. 生物信息学 陈铭_后基因组时代生物信息学_陈铭.pdf
  6. 利用计算机解决鸡兔同笼问题,利用极限思想解决复杂鸡兔同笼问题
  7. 如何将项目发布到阿里云_尚硅谷基于阿里云搭建数据仓库(实时)项目视频发布...
  8. 开源论坛之discourse搭建
  9. 数据结构实践项目——图的基本运算及遍历操作
  10. PostgreSQl中 index scan 代价的进一步学习