The JMSAppender will publish logging information to a JMS Topic specified in the log4 configuration file.

Sample Log4j.properties configuration

log4j.rootLogger=DEBUG, jms
log4j.appender.jms=org.apache.log4j.net.JMSAppender
log4j.appender.jms.InitialContextFactoryName=org.jnp.interfaces.NamingContextFactory
log4j.appender.jms.ProviderURL=jnp://server:1099
log4j.appender.jms.TopicBindingName=topic/testTopic
log4j.appender.jms.TopicConnectionFactoryBindingName=ConnectionFactory

Reference: http://java.sun.com/products/jms/ http://logging.apache.org/log4j/docs/api/org/apache/log4j/net/JMSAppender.html

  • No labels