• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log4JJDBCAppender calling stored proc

 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, but you could certainly write a subclass of that appender which called the stored procedure when it initialized itself.
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

Thanks. I will start reading on it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic