You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/07/11 07:49:42 UTC

[GitHub] [dolphinscheduler] kyoty opened a new issue #5795: [Improvement][Server] The starttime field in the HttpTask log is not displayed as expected.

kyoty opened a new issue #5795:
URL: https://github.com/apache/dolphinscheduler/issues/5795


   *For better global communication, please give priority to using English description, thx! *
   
   *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.*
   
   **Describe the question**  
   
   
   ![image](https://user-images.githubusercontent.com/52202080/125186281-0e512680-e25c-11eb-8d5c-59d54640709d.png)
   
   ```java
               long costTime = System.currentTimeMillis() - startTime;
               logger.info("startTime: {}, httpUrl: {}, httpMethod: {}, costTime : {}Millisecond, statusCode : {}, body : {}, log : {}",
                       DateUtils.format2Readable(startTime), httpParameters.getUrl(), httpParameters.getHttpMethod(), costTime, statusCode, body, output);
   
   
               public static String format2Readable(long ms) {
           
                   long days = MILLISECONDS.toDays(ms);
                   long hours = MILLISECONDS.toDurationHours(ms);
                   long minutes = MILLISECONDS.toDurationMinutes(ms);
                   long seconds = MILLISECONDS.toDurationSeconds(ms);
           
                   return String.format("%02d %02d:%02d:%02d", days, hours, minutes, seconds);
           
               }
   ```
   The API `format2Readable` is intended to display the execution time of a task more friendly, such as how many days and hours it has been executed.
   It's better to convert the timestamp to a formatted time according to a specified `DateTimeFormatter`
   
   
   
   **Which version of DolphinScheduler:**
    latest dev branch
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative improvement solutions you've considered.
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [dolphinscheduler] CalvinKirs closed issue #5795: [Improvement][Server] The starttime field in the HttpTask log is not displayed as expected.

Posted by GitBox <gi...@apache.org>.
CalvinKirs closed issue #5795:
URL: https://github.com/apache/dolphinscheduler/issues/5795


   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #5795: [Improvement][Server] The starttime field in the HttpTask log is not displayed as expected.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5795:
URL: https://github.com/apache/dolphinscheduler/issues/5795#issuecomment-877757121


   Hi:
   * Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/zh-cn/community/development/subscribe.html ,Then write the issue URL in the email content and send question to dev@dolphinscheduler.apache.org.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org