Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
68a5e89
Add separate workflow instance logs
Apr 2, 2026
1efe619
Merge branch 'apache:dev' into Feature-18125
njnu-seafish Apr 2, 2026
1952489
Merge branch 'dev' into DSIP-107
SbloodyS Apr 3, 2026
5a4d175
Merge remote-tracking branch 'origin/dev' into DSIP-107
Apr 16, 2026
f38aa56
Resolve conflicts
Apr 16, 2026
94708ed
Merge branch 'dev' into DSIP-107
ruanwenjun Apr 25, 2026
2ef11be
Merge branch 'apache:dev' into DSIP-107
njnu-seafish May 13, 2026
c2e475a
set logPath in AbstractCommandHandler
May 14, 2026
e71f415
Merge branch 'dev' into DSIP-107
njnu-seafish May 14, 2026
5689ffe
Merge branch 'dev' into DSIP-107
njnu-seafish May 15, 2026
8df0376
Merge branch 'apache:dev' into DSIP-107
njnu-seafish May 19, 2026
bf4e76e
add query and delete workflow log in backend
May 19, 2026
c81b961
update import
May 19, 2026
ca022f7
add query and delete workflow log in frontend
May 21, 2026
c6ff5c9
remove locates
May 21, 2026
26d09c0
Delete redundant file
May 21, 2026
e7bcda8
Merge branch 'dev' into DSIP-107
njnu-seafish May 21, 2026
4062178
Add blank lines
May 22, 2026
65f9377
Merge branch 'DSIP-107' of github.com:njnu-seafish/dolphinscheduler i…
May 22, 2026
3911cab
Merge branch 'dev' into DSIP-107
njnu-seafish May 25, 2026
0931712
Merge branch 'dev' into DSIP-107
njnu-seafish May 27, 2026
d93f2ba
Merge branch 'apache:dev' into DSIP-107
njnu-seafish Jun 9, 2026
9f06e8b
adapt to 3.5.0
Jun 9, 2026
1064e23
Merge branch 'dev' into DSIP-107
njnu-seafish Jun 12, 2026
cbcffb9
Merge branch 'dev' into DSIP-107
njnu-seafish Jun 22, 2026
0e06a2f
Merge branch 'dev' into DSIP-107
njnu-seafish Jun 23, 2026
9914755
Merge branch 'dev' into DSIP-107
njnu-seafish Jun 26, 2026
136128a
Merge branch 'dev' into DSIP-107
njnu-seafish Jul 9, 2026
612977a
Merge branch 'dev' into DSIP-107
njnu-seafish Jul 20, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ public class WorkflowInstance {

private Date restartTime;

private String logPath;

/**
* set the process name with process define version and timestamp
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ CREATE TABLE t_ds_workflow_instance
var_pool longtext,
dry_run int NULL DEFAULT 0,
restart_time datetime DEFAULT NULL,
log_path longtext DEFAULT NULL,
PRIMARY KEY (id)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ CREATE TABLE `t_ds_workflow_instance` (
`dry_run` tinyint(4) DEFAULT '0' COMMENT 'dry run flag:0 normal, 1 dry run',
`next_workflow_instance_id` int(11) DEFAULT '0' COMMENT 'serial queue next workflowInstanceId',
`restart_time` datetime DEFAULT NULL COMMENT 'workflow instance restart time',
`log_path` longtext DEFAULT NULL COMMENT 'workflow instance log path',
PRIMARY KEY (`id`),
KEY `workflow_instance_index` (`workflow_definition_code`,`id`) USING BTREE,
KEY `start_time_index` (`start_time`,`end_time`) USING BTREE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ CREATE TABLE t_ds_workflow_instance (
dry_run int DEFAULT '0' ,
next_workflow_instance_id int DEFAULT '0',
restart_time timestamp DEFAULT NULL ,
log_path text DEFAULT NULL ,
PRIMARY KEY (id)
) ;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

ALTER TABLE `t_ds_workflow_instance`
ADD COLUMN `log_path` longtext NULL COMMENT 'workflow instance log path';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ADD COLUMN `log_path` longtext NULL COMMENT 'workflow instance log path';
ADD COLUMN `log_path` longtext NULL COMMENT 'workflow instance log path';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ADD COLUMN log_path longtext NULL COMMENT 'workflow instance log path';

ok,thanks

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

ALTER TABLE t_ds_workflow_instance ADD COLUMN IF NOT EXISTS "log_path" text DEFAULT NULL;
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.dolphinscheduler.server.master.engine.workflow.execution.IWorkflowExecution;
import org.apache.dolphinscheduler.server.master.runner.IWorkflowExecuteContext;
import org.apache.dolphinscheduler.server.master.utils.ExceptionUtils;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
Expand Down Expand Up @@ -86,11 +87,14 @@ public void fireAllRegisteredEvent() {
final String workflowInstanceName = workflowExecution.getName();
try {
LogUtils.setWorkflowInstanceIdMDC(workflowInstanceId);
WorkflowLogUtils.setWorkflowInstanceLogFullPathMDC(
workflowExecution.getWorkflowExecuteContext().getWorkflowInstance().getLogPath());
doFireSingleWorkflowEventBus(workflowExecution);
} catch (Exception ex) {
log.error("Fire event failed for WorkflowExecuteRunnable: {}", workflowInstanceName, ex);
} finally {
LogUtils.removeWorkflowInstanceIdMDC();
WorkflowLogUtils.removeWorkflowInstanceLogFullPathMDC();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public WorkflowExecution handleCommand(final Command command) {
assembleWorkflowInstanceLifecycleListeners(workflowExecuteContextBuilder);
assembleWorkflowEventBus(workflowExecuteContextBuilder);
assembleWorkflowExecutionGraph(workflowExecuteContextBuilder);
assembleLogPath(workflowExecuteContextBuilder);

final WorkflowExecutionBuilder workflowExecutionBuilder = WorkflowExecutionBuilder
.builder()
Expand Down Expand Up @@ -159,4 +160,8 @@ protected void assembleProject(
workflowExecuteContextBuilder.setProject(project);
}

protected void assembleLogPath(final WorkflowExecuteContextBuilder workflowExecuteContextBuilder) {
workflowExecuteContextBuilder.setLogPath(workflowExecuteContextBuilder.getWorkflowInstance().getLogPath());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.apache.dolphinscheduler.server.master.engine.task.execution.TaskExecution;
import org.apache.dolphinscheduler.server.master.engine.task.execution.TaskExecutionBuilder;
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteContext.WorkflowExecuteContextBuilder;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -86,6 +87,12 @@ protected void assembleWorkflowInstance(final WorkflowExecuteContextBuilder work
workflowInstance.setTaskDependType(command.getTaskDependType());
}
workflowInstance.setHost(masterConfig.getMasterAddress());
workflowInstance.setLogPath(WorkflowLogUtils.getWorkflowInstanceLogFullPath(
workflowInstance.getRestartTime(),
workflowInstance.getWorkflowDefinitionCode(),
workflowInstance.getWorkflowDefinitionVersion(),
workflowInstance.getId()));

workflowInstanceDao.updateById(workflowInstance);
workflowExecuteContextBuilder.setWorkflowInstance(workflowInstance);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.dolphinscheduler.dao.repository.WorkflowInstanceDao;
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteContext.WorkflowExecuteContextBuilder;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import java.util.Date;
import java.util.List;
Expand Down Expand Up @@ -74,6 +75,12 @@ protected void assembleWorkflowInstance(final WorkflowExecuteContextBuilder work
workflowInstance.setHost(masterConfig.getMasterAddress());
workflowInstance.setEndTime(null);
workflowInstance.setRunTimes(workflowInstance.getRunTimes() + 1);
workflowInstance.setLogPath(WorkflowLogUtils.getWorkflowInstanceLogFullPath(
workflowInstance.getRestartTime(),
workflowInstance.getWorkflowDefinitionCode(),
workflowInstance.getWorkflowDefinitionVersion(),
workflowInstance.getId()));

workflowInstanceDao.updateById(workflowInstance);

workflowExecuteContextBuilder.setWorkflowInstance(workflowInstance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.dolphinscheduler.server.master.engine.task.execution.TaskExecutionBuilder;
import org.apache.dolphinscheduler.server.master.engine.task.execution.TaskInstanceFactories;
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteContext.WorkflowExecuteContextBuilder;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import java.util.ArrayList;
import java.util.HashSet;
Expand Down Expand Up @@ -95,6 +96,12 @@ protected void assembleWorkflowInstance(
workflowInstance.setStateWithDesc(WorkflowExecutionStatus.RUNNING_EXECUTION, command.getCommandType().name());
workflowInstance.setCommandType(command.getCommandType());
workflowInstance.setHost(masterConfig.getMasterAddress());
workflowInstance.setLogPath(WorkflowLogUtils.getWorkflowInstanceLogFullPath(
workflowInstance.getStartTime(),
workflowInstance.getWorkflowDefinitionCode(),
workflowInstance.getWorkflowDefinitionVersion(),
workflowInstance.getId()));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's best to inject the log path at runtime. You can write the code at CommandEngine, can add a new field at WorkflowStartLifecycleEvent.

@njnu-seafish njnu-seafish May 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's best to inject the log path at runtime. You can write the code at CommandEngine, can add a new field at WorkflowStartLifecycleEvent.

That's a great idea! With your guidance, I found an even better way to implement it: we can uniformly set the logPath value in the abstract parent class AbstractCommandHandler.

protected void assembleWorkflowInstanceLogPath(final WorkflowExecuteContextBuilder workflowExecuteContextBuilder) {
final WorkflowInstance workflowInstance = workflowExecuteContextBuilder.getWorkflowInstance();
final Date logTime = workflowInstance.getRestartTime() != null
? workflowInstance.getRestartTime()
: workflowInstance.getStartTime();
final String logPath = WorkflowLogUtils.getWorkflowInstanceLogFullPath(
logTime,
workflowInstance.getWorkflowDefinitionCode(),
workflowInstance.getWorkflowDefinitionVersion(),
workflowInstance.getId());
workflowInstance.setLogPath(logPath);
workflowInstanceDao.updateById(workflowInstance);
workflowExecuteContextBuilder.setWorkflowInstance(workflowInstance);
}

workflowInstanceDao.updateById(workflowInstance);

workflowExecuteContextBuilder.setWorkflowInstance(workflowInstance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.dolphinscheduler.dao.repository.WorkflowInstanceDao;
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteContext;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
Expand All @@ -45,6 +46,12 @@ protected void assembleWorkflowInstance(WorkflowExecuteContext.WorkflowExecuteCo
.orElseThrow(() -> new IllegalArgumentException("Cannot find WorkflowInstance:" + workflowInstanceId));
workflowInstance.setStateWithDesc(WorkflowExecutionStatus.RUNNING_EXECUTION, command.getCommandType().name());
workflowInstance.setHost(masterConfig.getMasterAddress());
workflowInstance.setLogPath(WorkflowLogUtils.getWorkflowInstanceLogFullPath(
workflowInstance.getRestartTime(),
workflowInstance.getWorkflowDefinitionCode(),
workflowInstance.getWorkflowDefinitionVersion(),
workflowInstance.getId()));

workflowInstanceDao.updateById(workflowInstance);
workflowExecuteContextBuilder.setWorkflowInstance(workflowInstance);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.dolphinscheduler.server.master.engine.task.execution.TaskExecution;
import org.apache.dolphinscheduler.server.master.engine.task.execution.TaskExecutionBuilder;
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteContext.WorkflowExecuteContextBuilder;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import org.apache.commons.collections4.CollectionUtils;

Expand Down Expand Up @@ -77,6 +78,12 @@ protected void assembleWorkflowInstance(final WorkflowExecuteContextBuilder work
workflowInstance.setHost(masterConfig.getMasterAddress());
workflowInstance.setCommandParam(command.getCommandParam());
workflowInstance.setGlobalParams(mergeCommandParamsWithWorkflowParams(command, workflowDefinition));
workflowInstance.setLogPath(WorkflowLogUtils.getWorkflowInstanceLogFullPath(
workflowInstance.getStartTime(),
workflowInstance.getWorkflowDefinitionCode(),
workflowInstance.getWorkflowDefinitionVersion(),
workflowInstance.getId()));

workflowInstanceDao.upsertWorkflowInstance(workflowInstance);
workflowExecuteContextBuilder.setWorkflowInstance(workflowInstance);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.dolphinscheduler.server.master.engine.task.execution.TaskExecution;
import org.apache.dolphinscheduler.server.master.engine.task.execution.TaskExecutionBuilder;
import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteContext.WorkflowExecuteContextBuilder;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import java.util.Date;
import java.util.Map;
Expand Down Expand Up @@ -89,6 +90,12 @@ protected void assembleWorkflowInstance(
workflowInstance.setRestartTime(new Date());
workflowInstance.setState(workflowFailoverCommandParam.getWorkflowExecutionStatus());
workflowInstance.setHost(masterConfig.getMasterAddress());
workflowInstance.setLogPath(WorkflowLogUtils.getWorkflowInstanceLogFullPath(
workflowInstance.getRestartTime(),
workflowInstance.getWorkflowDefinitionCode(),
workflowInstance.getWorkflowDefinitionVersion(),
workflowInstance.getId()));

workflowInstanceDao.updateById(workflowInstance);

workflowExecuteContextBuilder.setWorkflowInstance(workflowInstance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.dolphinscheduler.server.master.engine.task.dispatcher.event.TaskDispatchableEvent;
import org.apache.dolphinscheduler.server.master.engine.task.execution.ITaskExecution;
import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFailedLifecycleEvent;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;
import org.apache.dolphinscheduler.task.executor.log.TaskExecutorMDCUtils;

import java.util.Date;
Expand Down Expand Up @@ -93,9 +94,12 @@ public void run() {
TaskExecutorMDCUtils.MDCAutoClosable ignore =
TaskExecutorMDCUtils.logWithMDC(taskExecution.getId())) {
LogUtils.setWorkflowInstanceIdMDC(taskExecution.getTaskInstance().getWorkflowInstanceId());
WorkflowLogUtils
.setWorkflowInstanceLogFullPathMDC(taskExecution.getWorkflowInstance().getLogPath());
doDispatchTask(taskExecution);
} finally {
LogUtils.removeWorkflowInstanceIdMDC();
WorkflowLogUtils.removeWorkflowInstanceLogFullPathMDC();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.apache.dolphinscheduler.server.master.engine.workflow.policy.IWorkflowFailureStrategy;
import org.apache.dolphinscheduler.server.master.metrics.WorkflowInstanceMetrics;
import org.apache.dolphinscheduler.server.master.utils.WorkflowInstanceUtils;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;
import org.apache.dolphinscheduler.service.alert.WorkflowAlertManager;

import org.apache.commons.collections4.CollectionUtils;
Expand Down Expand Up @@ -116,12 +117,15 @@ protected void triggerTasks(final IWorkflowExecution workflowExecution,
protected void pauseActiveTask(final IWorkflowExecution workflowExecution) {
try {
LogUtils.setWorkflowInstanceIdMDC(workflowExecution.getId());
WorkflowLogUtils.setWorkflowInstanceLogFullPathMDC(
workflowExecution.getWorkflowExecuteContext().getWorkflowInstance().getLogPath());
workflowExecution
.getWorkflowExecutionGraph()
.getActiveTaskExecution()
.forEach(ITaskExecution::pause);
} finally {
LogUtils.removeWorkflowInstanceIdMDC();
WorkflowLogUtils.removeWorkflowInstanceLogFullPathMDC();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.apache.dolphinscheduler.plugin.task.api.utils.LogUtils;
import org.apache.dolphinscheduler.server.master.engine.task.execution.ITaskExecution;
import org.apache.dolphinscheduler.server.master.engine.task.lifecycle.event.TaskFailoverLifecycleEvent;
import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import org.springframework.stereotype.Component;

Expand All @@ -30,6 +31,7 @@ public void failoverTask(final ITaskExecution taskExecution) {
LogUtils.setWorkflowInstanceIdMDC(taskExecution.getWorkflowInstance().getId());
taskExecution.getWorkflowEventBus().publish(TaskFailoverLifecycleEvent.of(taskExecution));
LogUtils.removeWorkflowInstanceIdMDC();
WorkflowLogUtils.removeWorkflowInstanceLogFullPathMDC();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.dolphinscheduler.server.master.log;

import org.apache.dolphinscheduler.server.master.utils.WorkflowLogUtils;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import org.slf4j.MDC;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.sift.AbstractDiscriminator;

/**
* Workflow Log Discriminator
*/
@Slf4j
@Getter
@Setter
public class WorkflowLogDiscriminator extends AbstractDiscriminator<ILoggingEvent> {

private String key;

Check notice

Code scanning / CodeQL

Missing Override annotation Note

This method overrides
Discriminator.getKey
; it is advisable to add an Override annotation.

private String logBase;

@Override
public String getDiscriminatingValue(ILoggingEvent event) {
String workflowInstanceLogPath = MDC.get(WorkflowLogUtils.WORKFLOW_INSTANCE_LOG_FULL_PATH_MDC_KEY);
if (workflowInstanceLogPath == null) {
log.error("The workflow instance log path is null, please check the logback configuration, log: {}", event);
}
return workflowInstanceLogPath;
}

}
Loading
Loading