hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wenxin he (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-14587) Use GenericTestUtils.setLogLevel when available in hadoop-common
Date Mon, 26 Jun 2017 12:02:00 GMT

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

wenxin he commented on HADOOP-14587:
------------------------------------

001.patch

# {{org.apache.log4j.Level}} in hadoop-auth leaves unchanged for hadoop-auth can not depend
on GenericTestUtils in hadoop-common.
# A helper method added in GenericTestUtils to facilitate the migration. 
After moving commons logging APIs over to slf4j, this method can be removed without any changes.
# {{org.slf4j.event.Level}} has no "ALL" value, so I mapped {{org.apache.log4j.Level.ALL}}
to {{org.slf4j.event.Level.TRACE}} which is the lowest priority.
# About replacing {{org.apache.log4j.Logger.getRootLogger()}}
In {{TestGroupFallback}}, I found {{org.slf4j.LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME)}}
is not equivalent to {{org.apache.log4j.Logger.getRootLogger()}}.
so I used {{org.slf4j.LoggerFactory.getLogger("org")}} to replace {{org.apache.log4j.Logger.getRootLogger()}}
and the tests output is the same with original.
I am not sure whether it's OK or not?

> Use GenericTestUtils.setLogLevel when available in hadoop-common
> ----------------------------------------------------------------
>
>                 Key: HADOOP-14587
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14587
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: wenxin he
>            Assignee: wenxin he
>         Attachments: HADOOP-14587.001.patch
>
>
> Based on Brahma's comment in HADOOP-14296, it's better to use GenericTestUtils.setLogLevel
as possible to make the migration easier.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message