来源于 :  https://blog.csdn.net/testcs_dn/article/details/86309819

springboot日志配置 logging.path  logging.file 注意事项

可能有些小伙伴会同时配置 logging.path 和 logging.file,但是又发现其中一个不生效。

官方文档中有这么一句:

If you want to write log files in addition to the console output you
need to set a logging.file or logging.path property
也就是说,它们不会同时生效,只配置其中一个就好了。

例如我配置的时候只指定path

logging.path = ./logs
那么记录日志的时候默认的文件名是:spring.log

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
  • 2021-10-14
  • 2021-09-04
  • 2021-06-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-01-18
  • 2022-01-27
相关资源
相似解决方案