• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Log4JJDBCAppender calling stored proc

 
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Sheriff
Posts: 28413
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

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