rickchengx commented on code in PR #13332:
URL:
https://github.com/apache/dolphinscheduler/pull/13332#discussion_r1062051074
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -2179,4 +2184,22 @@ private enum WorkflowRunnableStatus {
}
+ private void sendRemoteLogIfNeeded(TaskInstance taskInstance) {
+ if
("true".equalsIgnoreCase(PropertyUtils.getString(Constants.REMOTE_LOGGING_ENABLE)))
{
+ if (taskInstance.getHost().endsWith(masterAddress.split(":")[1])) {
+ try {
+ logger.info("Start to send master's log {} to remote
target {}", taskInstance.getLogPath(),
+
PropertyUtils.getString(Constants.REMOTE_LOGGING_TARGET));
+
+ RemoteLogHandler remoteLogHandler =
RemoteLogHandlerFactory.getRemoteLogHandler();
+ remoteLogHandler.sendRemoteLog(taskInstance.getLogPath());
+
+ logger.info("Succeed to send master's log {} to remote
target {}", taskInstance.getLogPath(),
+
PropertyUtils.getString(Constants.REMOTE_LOGGING_TARGET));
+ } catch (Exception e) {
+ logger.error("send master's log {} to remote target
error", taskInstance.getLogPath(), e);
Review Comment:
Sure, I'll look into it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]