hadoop-yarn-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] (YARN-6873) Moving logging APIs over to slf4j in hadoop-yarn-server-applicationhistoryservice
Date Tue, 01 Aug 2017 06:32:00 GMT

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

Wenxin He commented on YARN-6873:
---------------------------------

Is it a good idea to add a helper method in hadoop-common to determine whether the LOG is
Log4j implement like this?

{noformat}
  public static boolean isLog4jLogger(Class<?> clazz) {
    if (clazz == null) {
      return false;
    }
    Logger log = LoggerFactory.getLogger(clazz);
    return log instanceof Log4jLoggerAdapter;
  }
{noformat}

In this way, we do not have to care of which adapter we use and prevent us from such bugs.

> Moving logging APIs over to slf4j in hadoop-yarn-server-applicationhistoryservice
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-6873
>                 URL: https://issues.apache.org/jira/browse/YARN-6873
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Yeliang Cang
>            Assignee: Yeliang Cang
>         Attachments: YARN-6873.001.patch, YARN-6873.002.patch, YARN-6873.003.patch
>
>




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

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


Mime
View raw message