The moose likes Other Open Source Projects and the fly likes Log4JJDBCAppender calling stored proc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Log4JJDBCAppender calling stored proc" Watch "Log4JJDBCAppender calling stored proc" New topic

Log4JJDBCAppender calling stored proc

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hello Guyz,

Good Day..

I need some functionality to log events in my apps and found the apache log4j logging api after googling for some time.

I am still reading and experimenting on the basic features but found out
about the JDBCAppender.

My question is that can I call stored procedures in Log4j instead of the usual SQL statement of "Insert into...." and if possible a good link also to learn how to do it.

I need to do some processing first before logging anything so I am thinking about using stored procedures. I am using SQL Server as my database backend.

Thanks for your future comments..

Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

No, but you could certainly write a subclass of that appender which called the stored procedure when it initialized itself.
Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi Paul,

Thanks. I will start reading on it.
I agree. Here's the link:
subject: Log4JJDBCAppender calling stored proc
jQuery in Action, 3rd edition