jQuery in Action, 3rd edition
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j logging to database" Watch "log4j logging to database" New topic

log4j logging to database

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426

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

Joined: Jul 20, 2005
Posts: 10441

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

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
It's not a secret anymore!