ruanwenjun commented on a change in pull request #6731:
URL: https://github.com/apache/dolphinscheduler/pull/6731#discussion_r750980804



##########
File path: 
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/LoggerUtils.java
##########
@@ -71,12 +72,14 @@ private LoggerUtils() {
      * @return task id format
      */
     public static String buildTaskId(String affix,
+                                     Date firstSubmitTime,
                                      Long processDefineCode,
                                      int processDefineVersion,
                                      int processInstId,
                                      int taskId) {
-        // - [taskAppId=TASK-798_1-4084-15210]
-        return String.format(" - %s%s-%s_%s-%s-%s]", TASK_APPID_LOG_FORMAT, 
affix, processDefineCode, processDefineVersion, processInstId, taskId);
+        // - [taskAppId=TASK-20211107-798_1-4084-15210]
+        String firstSubmitTimeStr = DateUtils.format(firstSubmitTime, 
Constants.YYYYMMDD);
+        return String.format(" - %s%s-%s-%s_%s-%s-%s]", TASK_APPID_LOG_FORMAT, 
affix, firstSubmitTimeStr, processDefineCode, processDefineVersion, 
processInstId, taskId);

Review comment:
       I mean why not use a consistent separator?  The current log looks like 
`453920594116992_1-1-1.log`, I prefer `453920594116992-1-1-1.log`. This maybe a 
history issue.
   Anyway, it is not a big deal, maybe I like to use consistent separator.
   
   It's better to extract code from `LogUtils` and `LoggerUtils`, otherwise it 
may easy to generate bug if someone change the path.
   It can be a future job.




-- 
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]


Reply via email to