日志文件配置。注意,如果 logging.file.name 不放在 bootstrap.yaml 配置文件,而是放在 application.yaml 中,会导致出现 LOG_FILE_IS_UNDEFINED 文件

This commit is contained in:
YunaiV
2022-06-18 00:37:54 +08:00
parent 2bd40cfb3b
commit 89848cebf3
8 changed files with 93 additions and 25 deletions

View File

@@ -7,3 +7,8 @@ spring:
server:
port: 48080
# 日志文件配置。注意,如果 logging.file.name 不放在 bootstrap.yaml 配置文件,而是放在 application.yaml 中,会导致出现 LOG_FILE_IS_UNDEFINED 文件
logging:
file:
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径