[ 
https://issues.apache.org/jira/browse/ROCKETMQ-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15831363#comment-15831363
 ] 

ASF GitHub Bot commented on ROCKETMQ-42:
----------------------------------------

Github user wu-sheng commented on the issue:

    https://github.com/apache/incubator-rocketmq/pull/35
  
    I have known about @shroman 's issue. And I am sure he is right about that 
log is better than `e.printStackTrace()` or `system.out`. And here, there is a 
special scene.
    
    Let's focus on `FiltersrvStartup.java`'s change logs. This `system.out` is 
unavoidable.
    * `try-catch` block starts at line 74
    *  Field `log` is initialized at line 128
    
    If codes occur exception between these two lines, certainly be `catch`ed, 
and trigger `NullPointException` in catch.
    
    Other changes like this one, this is why I only change these classes, as so 
many `System.out`s are used in project.
    
    You see, this is also why we need discuss before merge or close. 😊


> Output is not friendly, when Main failed.
> -----------------------------------------
>
>                 Key: ROCKETMQ-42
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-42
>             Project: Apache RocketMQ
>          Issue Type: Improvement
>          Components: rocketmq-namesrv
>            Reporter: Wu Sheng
>            Assignee: Xiaorui Wang
>            Priority: Trivial
>
> When Main failed, just use 'e.printStackTrace();' to output the exception 
> stack, but no prefix info.
> This is a very tiny adjustment. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to