wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes log4j logging to database 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 "log4j logging to database" Watch "log4j logging to database" New topic
Author

log4j logging to database

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hello,

Good Day..

I am trying out some example regarding logging in the database from JDBCAppender of Log4J from the book that I am reading but can't seem to make it work.

Here is the code where the book tried extending the JDBCAppender



...and here's my modified properties file



From what I am seeing, it was able to instantiate the class CustomJDBCAppender because the constructor was called but the overriden method was not called...

I would really appreciate all your pointers. Thanks.


Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

Your CustomJDBCAppender class doesn't seem to have a "package" declaration. Add the following package declaration to that class:


[My Blog] [JavaRanch Journal]
Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hello,

Sorry..I forgot to include that when I copied the definition of my class but my class is package accordingly.



But still the overriden execute method was not executed accordingly. Maybe I am missing something that I need to place in the code, Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j logging to database