Abgeschickt von Murthy am 29 November, 2004 um 22:12:43
I am trying to use the 'storedprocedure' option with the JDBCAppender. I would really appreciate it if anyone could tell me if this is possible.
Here are the details:
1) My Oracle stored procedure takes a number of input parameters and inserts records into 2 tables after making sure that the records are already not present. Can I insert into multiple tables? Since, the inserts are done inside the stored procedure, my thoughts are that it might be possible. Please correct me if I am wrong?
2) The values for the input params themselves need to come from the various log points inside the application. Along with the typical logging entries such as MSG, TIMESTAMP, ...etc, I need to log various application related custom values such as transaction_id, sender_id, receiver_id, ... etc. Since I need to insert custom values, can set up the configuration inside a log4j configuration xml? Or, do I need to setup the configuration from my java code? How do I do it? Are there examples for this?
3) Assuming that I have to setup the configuration from java code, do I need to write a wrapper class that can be called by the logging points inside the application? A particular method on the wrapper class would take as part of its parameters all the information needed by the stored procedure. The wrapper method would create the logger, set up the configuration and call the stored procedure that would insert into the database.
Am I thinking in the right direction? Any help is highly appreciated.
Thanks
Murthy