diff --git a/src/main/resources/application-local.yaml b/src/main/resources/application-local.yaml index fd25bfc64..9c30bf9f5 100644 --- a/src/main/resources/application-local.yaml +++ b/src/main/resources/application-local.yaml @@ -145,8 +145,8 @@ spring: # 日志文件配置 logging: file: - path: ${user.home}/logs/ # 日志文件的路径 - name: ${spring.application.name} # 日志文件名 +# path: ${user.home}/logs/ # 日志文件的路径 + name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 --- #################### 芋道相关配置 #################### diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 49eb3c249..fb75bc3b1 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,7 +1,11 @@ - + + + - + + +       @@ -13,22 +17,34 @@ + ${PATTERN_DEFAULT} + + ${LOG_FILE} - ${LOG_FILE}.%d{yyyy-MM-dd}.%i.log} - 10MB - 7 - false + + ${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz} + + ${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false} + + ${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB} + + ${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0} + + ${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30} + + 0 - 10 + + 256