运行Apache速度模板时获取调试消息

时间:2018-01-23 15:47:44

标签: java logging slf4j velocity

我正在运行Apache速度模板引擎(最新的2个)
我一直收到来自SLF4J的调试信息 这阻碍了用户查看重要消息,是否有办法抑制这些消息?

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/user1/Package/installer/lib/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/user1/Package/installer/lib/slf4j-simple-1.7.25.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.SimpleLoggerFactory]

1 个答案:

答案 0 :(得分:2)

消息警告您多个SLF4J

你有2个slf4j jars slf4j-simple-1.7.5.jarslf4j-simple-1.7.25.jar都有相同的类(StaticLoggerBinder),

从依赖项中删除其中一个jar,调试消息将消失。

相关问题