[ https://issues.apache.org/jira/browse/HADOOP-14549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059006#comment-16059006 ]
Akira Ajisaka commented on HADOOP-14549: ---------------------------------------- Thanks [~wenxin he] for creating a patch! {quote} bq. GenericTestUtils.setLogLevel is still using org.apache.log4j.Level as parameter which is log4j1 api. In log4j2, this changed to org.apache.logging.log4j.Level. Is this OK for us to migration to log4j2? This is okay. When migrating to log4j2, we need to update GenericTestUtils and that's all. If we don't do this, we need to update all the usage of org.apache.log4j.Logger.setLoglevel when upgrading to log4j2. {quote} Sorry I was wrong. We need to create a method that accepts org.slf4j.event.Level instead of log4j.Level as follows: {code} public static void setLogLevel(org.slf4j.Logger logger, org.slf4j.event.Level level) { setLogLevel(toLog4j(logger), Level.toLevel(level.toString())); } {code} that way we can avoid importing org.apache.log4j1 classes in the usage of the method. > Use GenericTestUtils.setLogLevel when available > ----------------------------------------------- > > Key: HADOOP-14549 > URL: https://issues.apache.org/jira/browse/HADOOP-14549 > Project: Hadoop Common > Issue Type: Sub-task > Reporter: Akira Ajisaka > Assignee: wenxin he > Attachments: HADOOP-14549.hadoop-tools.example.patch > > > Based on Brahma's > [comment|https://issues.apache.org/jira/browse/HADOOP-14296?focusedCommentId=16054390&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16054390] > 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org