Unless it has changed, there is (or was) no way to have the JMSAppender that comes with the log4j dist to point to a queue; it could only handle topics.
I have written a JMSQueueAppender which is similar to the above, but deals with queues (plus it also allows you to specify the machine and initial context factory explicitly in the config). To use the JMSAppender (to a topic), do this in your config file: log4j.myLogger=DEBUG, JMS1 log4j.appender.JMS1=org.apache.log4j.net.JMSAppender log4j.appender.JMS1.TopicBindingName=topic/to/use log4j.appender.JMS1.TopicConnectionFactoryBindingName=conn.factory.to.use (i.e., weblogic.jms.ConnectionFactory) Attached is my custom queue appender, below is the way to configure it: log4j.appender.JMS1=com.vignette.it.apps.util.JMSQueueAppender log4j.appender.JMS1.ProviderUrl=t3://someserver.mydomain.com:7001 log4j.appender.JMS1.ContextFactory=weblogic.jndi.WLInitialContextFactory log4j.appender.JMS1.QueueBindingName=queue/to/use log4j.appender.JMS1.QueueConnectionFactoryBindingName=weblogic.jms.Connectio nFactory HTH ----- Original Message ----- From: "Sam Cheung" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 27, 2002 1:55 AM Subject: Example of using JMSAppender > Hi, > > I am looking for an example of using JMSAppender in > log4j 1.2beta3. In particular, how to config > JMSAppender to send Logging Event to a specified > queue. > > I appreciate if someone tells me where I can find such > an example. > > Thanks. > Sam > > __________________________________________________ > Do You Yahoo!? > Yahoo! Greetings - Send FREE e-cards for every occasion! > http://greetings.yahoo.com > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> >
JMSQueueAppender.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>