Hey CM, thanks a lot. I got that thing working without using the ServerLogger funda as explained by you.
you have been very helpful and I appreciate that a lot. Thanks. Jimmy -----Original Message----- From: Chandra Mohan A R [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 6:54 AM To: Log4J Developers List Subject: RE: JMSAppender Dear Jimmy, In a scenario like this a ServerLogger is implemented which does the job very similar to the JMS Logger. Follow the same steps what u generally do if you need to update a DB with the log info and in the MDB check for the priority of the message being logged (if required) and call the ServerLogger which will have a JMSAppender doing the job(updating DB) for you. Infact in few cases where in, FATAL messages are generated define a JMSAppender to send mails to the concerned Sys. Admin./ App/ Admin. I hope this helps. regards, CM -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, February 14, 2004 6:17 AM To: [EMAIL PROTECTED] Subject: RE: JMSAppender Thanks CM, got the JMSAppender working. However there are a few queries still in my mind 1. How can I insert values in the database which is equivalent to this SQL INSERT INTO LOG_TEST (EXECUTION_DATE, LOGGER, PRIORITY, MESSAGE) VALUES ('%d', '%c', '%p', '%m') The above query maps to the following configuration that I have done in my log4j.xml file for JDBCAppender <appender name="JDBC" class="org.apache.log4j.jdbc.JDBCAppender"> <param name="driver" value="oracle.jdbc.driver.OracleDriver" /> <param name="URL" value="jdbc:oracle:thin:@10.45.194.47:1521:wells" /> <param name="user" value="view2" /> <param name="password" value="view2" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{MM:dd:yyyy HH:mm:ss} - %m" /> </layout> <param name="sql" value="INSERT INTO LOG_TEST (EXECUTION_DATE, LOGGER, PRIORITY, MESSAGE) VALUES ('%d', '%c', '%p', '%m')" /> </appender> Now if I want to do something similar using JMSAppender how do I do it. Since I have written an MDB, I will receive just a Message object in my onMessage method. So at most I can log only the message (%m). But what if I want to log different values in the database just the way I am doing in case of JDBCAppender above How will I go about implementing that. I am attaching my MDB with this mail for JMSAppender for your reference. Essentially what I want to do is insert 1. The execution date 2. Logger type 3. Priority 4. The log message something like INSERT INTO LOG_TEST (EXECUTION_DATE, LOGGER, PRIORITY, MESSAGE) VALUES ('%d', '%c', '%p', '%m') Thanks and Regards, Jimmy -----Original Message----- From: Chandra Mohan A R [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 8:32 PM To: Log4J Developers List Subject: RE: JMSAppender Hi Jimmy, Follow the following steps: 1. Create a Connection Factory for JMS in WLS. 2. Create a JMS Server(if u dont want to use an existing one) in WLS. 3. Create a destination of type JMS Topic for the server u previously created. 4. In the log4j.properties/ log4j.xml use the JMSAppender class. 5. Specify the jndi of the factory and topic as given in step1 and step3. Happy logging ..... regards, CM -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 1:07 AM To: [EMAIL PROTECTED] Subject: JMSAppender Hi All, Can anyone please tell me as to how do I go about using the JMSAppender to log messages to a JMS topic. I am using Weblogic 8.1 Thanks & Regards, Jimmy Shah MphasiS-BFL Limited, Wells Fargo Banking Services, 160 Spear Street, San Fransisco, CA-94108, USA. Tel :- O - (415) 498-1894 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
