Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【优化】 logback.xml 路径配置,由于 logback.xml 比 Spring 配置文件优先加载,无法读取路径配置,故更名为 … #3587

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions xxl-job-admin/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,15 @@ xxl.job.triggerpool.slow.max=100

### xxl-job, log retention days
xxl.job.logretentiondays=30

### logging
# Add line number to the console log
logging.pattern.console: %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) \
%clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} \
%clr([L:%line]){faint} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}
# log path
logging.file.path: ${module.base-path}/xxl-job


### module
module.base-path: /data/applogs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration debug="false" scan="true" scanPeriod="1 seconds">

<contextName>logback</contextName>
<property name="log.path" value="/data/applogs/xxl-job/xxl-job-admin.log"/>
<property name="log.path" value="${LOG_PATH}/xxl-job-admin.log"/>

<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
Expand Down