[jira] [Comment Edited] (HADOOP-14296) Move logging APIs over to slf4j in hadoop-tools

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Comment Edited] (HADOOP-14296) Move logging APIs over to slf4j in hadoop-tools

JIRA jira@apache.org

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

Brahma Reddy Battula edited comment on HADOOP-14296 at 6/19/17 5:36 PM:
------------------------------------------------------------------------

[~ajisakaa] thanks for working on this.sorry for landing late.


bq.Replaced log4j APIs with slf4j APIs. Some log4j APIs are kept as-is because slf4j cannot set log level.

we can use {{GenericTestUtils.setLogLevel(org.slf4j.Logger logger, Level level)}} to do this, like below for {{TestDistCh.java}}

{code}

    {
    GenericTestUtils.setLogLevel(NameNode.stateChangeLog, Level.ERROR);
    GenericTestUtils.setLogLevel(DataNode.LOG, Level.ERROR);
    GenericTestUtils.setLogLevel(FSNamesystem.LOG, Level.ERROR);
   }
{code}

Unfortunately {{TestHadoopArchives}},{{TestSleepJob}},{{TestGridmixSubmission}} and {{TestLoadJob}} can't used as they depends on {{groups}} and {{gridmix}} which will use commons logging. we couldn't have looked back..


was (Author: brahmareddy):
[~ajisakaa] thanks for working on this.sorry for landing late.


bq.Replaced log4j APIs with slf4j APIs. Some log4j APIs are kept as-is because slf4j cannot set log level.

we can use {{GenericTestUtils.setLogLevel(org.slf4j.Logger logger, Level level)}} to do this, like below for {{TestDistCh.java}}

{code}

    {
    GenericTestUtils.setLogLevel(NameNode.stateChangeLog, Level.ERROR);
    GenericTestUtils.setLogLevel(DataNode.LOG, Level.ERROR);
    GenericTestUtils.setLogLevel(FSNamesystem.LOG, Level.ERROR);
   }
{code}

Unfortunately {{TestHadoopArchives}},{{TestSleepJob}},{{TestGridmixSubmission}} and {{TestLoadJob}} can't used as they {{groups}} and {{gridmix}} will use commons logging. we couldn't have looked back..

> Move logging APIs over to slf4j in hadoop-tools
> -----------------------------------------------
>
>                 Key: HADOOP-14296
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14296
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Akira Ajisaka
>            Assignee: Akira Ajisaka
>         Attachments: HADOOP-14296.01.patch, HADOOP-14296.02.patch, HADOOP-14296.03.patch, HADOOP-14296.04.patch, HADOOP-14296-branch-2.01.patch
>
>




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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...