【发布时间】:2011-07-13 16:22:57
【问题描述】:
我希望所有来自 HornetQ(嵌入在我的应用程序中运行)的日志记录都委托给 slf4j。不幸的是,任何尝试都失败了。我已经试过了
- 添加了 jul-to-slf4j
- 安装了网桥
SLF4JBridgeHandler.install(); - 尝试了
Log4jLogDelegateFactory(“hornetq-configuration.xml”通过<log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>) - 写了我自己的
LogDelegate和LogDelegateFactory
但无论我做什么,以下几行都没有被抓住:
13.07.2011 17:42:11 org.hornetq.core.logging.impl.JULLogDelegate warn
WARNUNG: AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
13.07.2011 17:42:11 org.hornetq.core.logging.impl.JULLogDelegate info
INFO: Using NIO Journal
13.07.2011 17:42:11 org.hornetq.core.logging.impl.JULLogDelegate info
INFO: Started Netty Acceptor version 3.1.5.GA-r1772
我错过了什么?
【问题讨论】:
-
使用 jul-to-slf4j stackoverflow.com/questions/9117030/jul-to-slf4j-bridge 的解决方案对 hornetq 有效。
标签: slf4j hornetq java.util.logging