【发布时间】:2014-10-29 16:17:01
【问题描述】:
我正在使用 ActiveMQ(一个 apache camel 组件)将 SMS 从 web 发送到 GSM 手机,所以我需要使用 SLF4J。 当我运行它时,我在我的 netbeans 项目的输出中得到了这个 jar 似乎出现了两次,我认为我需要在 pom.xml 的依赖项中添加一个排除项,但我不知道该怎么做!
这是我pom.xml中的SLF4部分:
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
<!-- <exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions> -->
</dependency>
这是我运行项目时的输出
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/asus/.m2/repository/org/apache/activemq/activemq-all/5.9.0/activemq-all-5.9.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/asus/.m2/repository/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
【问题讨论】:
标签: java maven logging apache-camel slf4j