I want that all logging from HornetQ, which runs embedded in my application, is delegated to slf4j. Unfortunately any attempt failed. I allready tried
- added jul-to-slf4j
- installed the bridge
SLF4JBridgeHandler.install(); - Tried the
Log4jLogDelegateFactory(“hornetq-configuration.xml” via<log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>) - Wrote my own
LogDelegateandLogDelegateFactory
But whatever I do, the folloing lines are not catched:
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
Anything I did miss?
Since you are running Embedded, try adding this code before you start the server:
org.hornetq.core.logging.Logger.setDelegateFactory(new YourOwnDelegateFactory())
You had probably a few messages using the old delegate until the server got it from the config.