mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: product env can't output log to console #114
This commit is contained in:
parent
08f8a1141e
commit
39ae41d531
@ -2,18 +2,17 @@
|
|||||||
<!-- 生产环境日志 -->
|
<!-- 生产环境日志 -->
|
||||||
<configuration>
|
<configuration>
|
||||||
|
|
||||||
|
<!--默认配置-->
|
||||||
|
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||||
|
<!--配置控制台(Console)-->
|
||||||
|
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
日志路径,注意权限问题,否则无法打印日志。
|
日志路径,注意权限问题,否则无法打印日志。
|
||||||
大坑记录:`~/logs`不会在用户目录下创建文件夹,而是在项目目录下创建名为~的文件夹
|
大坑记录:`~/logs`不会在用户目录下创建文件夹,而是在项目目录下创建名为~的文件夹
|
||||||
-->
|
-->
|
||||||
<property name="LOG_PATH" value="${user.home}/powerjob-server/logs"/>
|
<property name="LOG_PATH" value="${user.home}/powerjob-server/logs"/>
|
||||||
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
|
||||||
<charset>utf8</charset>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统所有异常日志(ERROR)双写 start -->
|
<!-- 系统所有异常日志(ERROR)双写 start -->
|
||||||
<appender name="ERROR_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="ERROR_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.github.kfcfans.powerjob.server.test;
|
package com.github.kfcfans.powerjob.server.test;
|
||||||
|
|
||||||
|
import com.github.kfcfans.powerjob.common.InstanceStatus;
|
||||||
import com.github.kfcfans.powerjob.common.TimeExpressionType;
|
import com.github.kfcfans.powerjob.common.TimeExpressionType;
|
||||||
|
import com.github.kfcfans.powerjob.common.WorkflowInstanceStatus;
|
||||||
import com.github.kfcfans.powerjob.common.utils.NetUtils;
|
import com.github.kfcfans.powerjob.common.utils.NetUtils;
|
||||||
import com.github.kfcfans.powerjob.server.common.constans.SwitchableStatus;
|
import com.github.kfcfans.powerjob.server.common.constans.SwitchableStatus;
|
||||||
import com.github.kfcfans.powerjob.server.persistence.core.model.InstanceInfoDO;
|
import com.github.kfcfans.powerjob.server.persistence.core.model.InstanceInfoDO;
|
||||||
@ -104,12 +106,12 @@ public class RepositoryTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteInstanceInfo() {
|
public void testDeleteInstanceInfo() {
|
||||||
instanceInfoRepository.deleteAllByGmtModifiedBefore(new Date());
|
instanceInfoRepository.deleteAllByGmtModifiedBeforeAndStatusIn(new Date(), InstanceStatus.finishedStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteWorkflowInstanceInfo() {
|
public void testDeleteWorkflowInstanceInfo() {
|
||||||
workflowInstanceInfoRepository.deleteAllByGmtModifiedBefore(new Date());
|
workflowInstanceInfoRepository.deleteAllByGmtModifiedBeforeAndStatusIn(new Date(), WorkflowInstanceStatus.finishedStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user