[ https://issues.apache.org/jira/browse/HADOOP-16717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16976069#comment-16976069 ]
Steve Loughran commented on HADOOP-16717: ----------------------------------------- You should be able to switch to reflection here > Remove GenericsUtil isLog4jLogger > --------------------------------- > > Key: HADOOP-16717 > URL: https://issues.apache.org/jira/browse/HADOOP-16717 > Project: Hadoop Common > Issue Type: Improvement > Affects Versions: 3.2 > Reporter: David Mollitor > Assignee: Xieming Li > Priority: Major > > Remove this method: > {code:java} > /** > * Determine whether the log of <code>clazz</code> is Log4j implementation. > * @param clazz a class to be determined > * @return true if the log of <code>clazz</code> is Log4j implementation. > */ > public static boolean isLog4jLogger(Class<?> clazz) { > if (clazz == null) { > return false; > } > Logger log = LoggerFactory.getLogger(clazz); > return log instanceof Log4jLoggerAdapter; > } > {code} > This creates a dependency on Log4jLoggerAdapter (slf4j-log4j12) which means > that any project which depends on hadoop-commons needs to carry this > dependency as well. Such a simple use case and such a heavy dependency. The > commons library should not depend on any specific implementation of SLF4J > binding -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org