mirror of https://github.com/halo-dev/halo
Persist and archive historical logs (#3021)
#### What type of PR is this? /kind improvement /area core /milestone 2.1.x #### What this PR does / why we need it: Provide a default configuration for logging system. Default log filename is `${halo.work-dir}/logs/halo.log`. References: - https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.logging.file-output - https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.logging.file-rotation #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2968 #### Special notes for your reviewer: Start Halo and check the log file `${halo.work-dir}/logs/halo.log`. #### Does this PR introduce a user-facing change? ```release-note 持久化并归档历史日志 ```pull/3031/head
parent
082aa309f8
commit
77da761a13
|
@ -31,3 +31,12 @@ halo:
|
|||
springdoc:
|
||||
api-docs:
|
||||
enabled: false
|
||||
|
||||
logging:
|
||||
file:
|
||||
name: ${halo.work-dir}/logs/halo.log
|
||||
logback:
|
||||
rollingpolicy:
|
||||
max-file-size: 10MB
|
||||
total-size-cap: 1GB
|
||||
max-history: 0
|
||||
|
|
Loading…
Reference in New Issue