[ https://issues.apache.org/jira/browse/ROCKETMQ-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946703#comment-15946703 ]
ASF GitHub Bot commented on ROCKETMQ-158: ----------------------------------------- Github user vongosling commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/85#discussion_r108614905 --- Diff: tools/src/main/java/org/apache/rocketmq/tools/command/MQAdminStartup.java --- @@ -196,22 +196,11 @@ private static void initLog() { ILoggerFactory iLoggerFactory = LoggerFactory.getILoggerFactory(); Class classType = iLoggerFactory.getClass(); if (classType.getName().equals("org.slf4j.impl.Log4jLoggerFactory")) { - Class<?> domconfigurator; - Object domconfiguratorobj; - domconfigurator = Class.forName("org.apache.log4j.xml.DOMConfigurator"); - domconfiguratorobj = domconfigurator.newInstance(); - Method configure = domconfiguratorobj.getClass().getMethod("configure", String.class); - configure.invoke(domconfiguratorobj, rocketmqHome + "/conf/log4j_tools.xml"); + final String logfjConfigPath = rocketmqHome + "/conf/log4j_tools.xml"; + LogUtils.configLog4j(logfjConfigPath,null); } else if (classType.getName().equals("ch.qos.logback.classic.LoggerContext")) { - Class<?> joranConfigurator; --- End diff -- Could we extract this log loader logic into one place > Remove logback dependency for rocketmq-tools > -------------------------------------------- > > Key: ROCKETMQ-158 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-158 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-tools > Reporter: Jaskey Lam > Assignee: Jaskey Lam > Priority: Minor > > Since user may need to use some admin interfaces to maintain something like > create topic, manage queues. > They will need to use rocketmq-tools which contains DefaultMQAdminExt. > But rocketmq-tools has explicitly depend on logback-classic and logback-core, > which may be conflict with the logging framework of the user's application. -- This message was sent by Atlassian JIRA (v6.3.15#6346)