diff --git a/scheduler/src/main/resources/application-dev.yaml b/scheduler/src/main/resources/application-dev.yaml new file mode 100644 index 0000000..573bc89 --- /dev/null +++ b/scheduler/src/main/resources/application-dev.yaml @@ -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- diff --git a/scheduler/src/main/resources/logback-dev.xml b/scheduler/src/main/resources/logback-dev.xml new file mode 100644 index 0000000..8268f35 --- /dev/null +++ b/scheduler/src/main/resources/logback-dev.xml @@ -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> \ No newline at end of file