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

ASF GitHub Bot commented on NUTCH-2347:
---------------------------------------

Github user sebastian-nagel commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/166#discussion_r96527045
  
    --- Diff: src/java/org/apache/nutch/parse/ParseUtil.java ---
    @@ -237,7 +237,7 @@ public void processSitemapParse(String url, WebPage 
page,
               try {
                 reversedUrl = TableUtil.reverseUrl(toUrl); // collect it
               } catch (MalformedURLException e) {
    -            e.printStackTrace();
    +            LOG.error("MalformedURLException occurred: ", e);
    --- End diff --
    
    That a specific exception happened is obvious, would be better to explain 
what happened with which input, e.g.
    ```
    LOG.error("Failed to reverse URL {}: {}", toUrl, e.getMessage());
    ```
    This also applies to many other of the new log messages. 


> Use Logger Instead of Printing Throwable
> ----------------------------------------
>
>                 Key: NUTCH-2347
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2347
>             Project: Nutch
>          Issue Type: Improvement
>    Affects Versions: 2.3.1
>            Reporter: Furkan KAMACI
>            Assignee: Furkan KAMACI
>            Priority: Minor
>             Fix For: 2.4
>
>
> Loggers should be used instead of printing Throwable.



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

Reply via email to