我正在运行 Apache Velocity 模板引擎(最新 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]
最佳答案
消息警告您有关多个 SLF4J 类的信息,
您有 2 个 slf4j jar slf4j-simple-1.7.5.jar
和 slf4j-simple-1.7.25.jar
,它们都具有相同的类 (StaticLoggerBinder) ,
从依赖项中删除其中一个 jar,调试消息就会消失。
关于java - 运行 Apache Velocity 模板时获取调试消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48405698/