Skip to content

Commit

Permalink
add scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
wujia committed May 19, 2022
1 parent 80db581 commit d734eb1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scheduler/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
logging:
level:
ROOT: debug
org:
springframework:
data:
mongodb:
core: info
config: classpath:logback-dev.xml
file:
path: logs/datart-core.log

spring:
task:
execution:
pool:
core-size: 8
max-size: 16
queue-capacity: 64
keep-alive: 120s
thread-name-prefix: core-
27 changes: 27 additions & 0 deletions scheduler/src/main/resources/logback-dev.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<!-- use Spring default values -->
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>

<springProperty name="LOG_PATH" source="logging.path" defaultValue="logs"/>
<springProperty name="APP_NAME" source="spring.application.name" defaultValue="application"/>

<appender name="ROLLING-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
<file>${LOG_PATH}/${APP_NAME}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${LOG_PATH}/${APP_NAME}-%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 30 days to keep -->
<maxHistory>3</maxHistory>
</rollingPolicy>
</appender>

<root level="DEBUG">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="ROLLING-FILE"/>
</root>
</configuration>

0 comments on commit d734eb1

Please sign in to comment.