[ 
https://issues.apache.org/jira/browse/HADOOP-16717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xieming Li updated HADOOP-16717:
--------------------------------
    Attachment: HADOOP-16717.001.patch
        Status: Patch Available  (was: Open)

[[email protected]]Thank you for your suggestion. I have changed the function 
by using reflection to remove dependency to slf4j-log4j12.



> 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
>         Attachments: HADOOP-16717.001.patch
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to