You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/06 03:35:58 UTC

[GitHub] [incubator-eventmesh] MajorHe1 opened a new pull request, #2472: [ISSUE #2471] use log instead of print when exception occurred in EventMeshMessageTCPSubClient

MajorHe1 opened a new pull request, #2472:
URL: https://github.com/apache/incubator-eventmesh/pull/2472

   
   
   <!--
   ### Contribution Checklist
   
     - Name the pull request in the form "[ISSUE #XXXX] Title of the pull request", 
       where *XXXX* should be replaced by the actual issue number.
       Skip *[ISSUE #XXXX]* if there is no associated github issue for this pull request.
   
     - Fill out the template below to describe the changes contributed by the pull request. 
       That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue. 
       Please do not mix up code from multiple issues.
     
     - Each commit in the pull request should have a meaningful commit message.
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, 
       leaving only the filled out template below.
   
   (The sections below can be removed for hotfixes of typos)
   -->
   
   <!--
   (If this PR fixes a GitHub issue, please add `Fixes #<XXX>` or `Cloese #<XXX>`.)
   -->
   
   Fixes #2471.
   
   ### Motivation
   
   *Explain the content here.*
   *Explain why you want to make the changes and what problem you're trying to solve.*
   
   
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   
   
   ### Documentation
   
   - Does this pull request introduce a new feature? (yes / no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   - If a feature is not applicable for documentation, explain why?
   - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] MajorHe1 commented on a diff in pull request #2472: [ISSUE #2471] use log instead of print when exception occurred in EventMeshMessageTCPSubClient

Posted by GitBox <gi...@apache.org>.
MajorHe1 commented on code in PR #2472:
URL: https://github.com/apache/incubator-eventmesh/pull/2472#discussion_r1041691055


##########
eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPSubClient.java:
##########
@@ -126,7 +126,7 @@ public void close() {
         try {
             super.close();
         } catch (Exception ex) {
-            ex.printStackTrace();
+            log.warn("exception occurred when close.", ex);

Review Comment:
   log is generated by lombok, already change warn to error



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov[bot] commented on pull request #2472: [ISSUE #2471] use log instead of print when exception occurred in EventMeshMessageTCPSubClient

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #2472:
URL: https://github.com/apache/incubator-eventmesh/pull/2472#issuecomment-1338712163

   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2472](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (62acfac) into [master](https://codecov.io/gh/apache/incubator-eventmesh/commit/0a3d4b116d007ea01fcf6971410706bd8b78c51f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0a3d4b1) will **increase** coverage by `0.03%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2472      +/-   ##
   ============================================
   + Coverage     11.78%   11.82%   +0.03%     
   - Complexity      903      907       +4     
   ============================================
     Files           469      469              
     Lines         27799    27794       -5     
     Branches       3018     3010       -8     
   ============================================
   + Hits           3277     3286       +9     
   + Misses        24227    24214      -13     
   + Partials        295      294       -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...eventmeshmessage/EventMeshMessageTCPSubClient.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L3RjcC9pbXBsL2V2ZW50bWVzaG1lc3NhZ2UvRXZlbnRNZXNoTWVzc2FnZVRDUFN1YkNsaWVudC5qYXZh) | `6.45% <0.00%> (ø)` | |
   | [...rg/apache/eventmesh/runtime/trace/LogExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL3RyYWNlL0xvZ0V4cG9ydGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...ime/admin/handler/RedirectClientByPathHandler.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvUmVkaXJlY3RDbGllbnRCeVBhdGhIYW5kbGVyLmphdmE=) | `84.78% <0.00%> (ø)` | |
   | [...e/admin/handler/RedirectClientByIpPortHandler.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvUmVkaXJlY3RDbGllbnRCeUlwUG9ydEhhbmRsZXIuamF2YQ==) | `31.37% <0.00%> (ø)` | |
   | [...l/tcp/client/recommend/EventMeshRecommendImpl.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvdGNwL2NsaWVudC9yZWNvbW1lbmQvRXZlbnRNZXNoUmVjb21tZW5kSW1wbC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [.../tcp/client/session/push/DownStreamMsgContext.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvdGNwL2NsaWVudC9zZXNzaW9uL3B1c2gvRG93blN0cmVhbU1zZ0NvbnRleHQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../trace/pinpoint/exporter/PinpointSpanExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXRyYWNlLXBsdWdpbi9ldmVudG1lc2gtdHJhY2UtcGlucG9pbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC90cmFjZS9waW5wb2ludC9leHBvcnRlci9QaW5wb2ludFNwYW5FeHBvcnRlci5qYXZh) | `69.38% <0.00%> (+0.46%)` | :arrow_up: |
   | [...mesh/connector/standalone/broker/MessageQueue.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1zdGFuZGFsb25lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL3N0YW5kYWxvbmUvYnJva2VyL01lc3NhZ2VRdWV1ZS5qYXZh) | `40.25% <0.00%> (+7.79%)` | :arrow_up: |
   | [...tandalone/broker/task/HistoryMessageClearTask.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2472/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1zdGFuZGFsb25lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL3N0YW5kYWxvbmUvYnJva2VyL3Rhc2svSGlzdG9yeU1lc3NhZ2VDbGVhclRhc2suamF2YQ==) | `47.05% <0.00%> (+17.64%)` | :arrow_up: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx merged pull request #2472: [ISSUE #2471] use log instead of print when exception occurred in EventMeshMessageTCPSubClient

Posted by GitBox <gi...@apache.org>.
jonyangx merged PR #2472:
URL: https://github.com/apache/incubator-eventmesh/pull/2472


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx commented on a diff in pull request #2472: [ISSUE #2471] use log instead of print when exception occurred in EventMeshMessageTCPSubClient

Posted by GitBox <gi...@apache.org>.
jonyangx commented on code in PR #2472:
URL: https://github.com/apache/incubator-eventmesh/pull/2472#discussion_r1041028289


##########
eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPSubClient.java:
##########
@@ -126,7 +126,7 @@ public void close() {
         try {
             super.close();
         } catch (Exception ex) {
-            ex.printStackTrace();
+            log.warn("exception occurred when close.", ex);

Review Comment:
   I think that's better to use log.error method



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx commented on a diff in pull request #2472: [ISSUE #2471] use log instead of print when exception occurred in EventMeshMessageTCPSubClient

Posted by GitBox <gi...@apache.org>.
jonyangx commented on code in PR #2472:
URL: https://github.com/apache/incubator-eventmesh/pull/2472#discussion_r1041028289


##########
eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPSubClient.java:
##########
@@ -126,7 +126,7 @@ public void close() {
         try {
             super.close();
         } catch (Exception ex) {
-            ex.printStackTrace();
+            log.warn("exception occurred when close.", ex);

Review Comment:
   I think that's better to  use LOGGER instead of log  , and  use LOGGER.error method instead of log.warn method.



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org