File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes log4j Revoking the JDBCAppender after the Database Connection has been established 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 Revoking the JDBCAppender after the Database Connection has been established" Watch "log4j Revoking the JDBCAppender after the Database Connection has been established" New topic
Author

log4j Revoking the JDBCAppender after the Database Connection has been established

rajesh thyagu
Greenhorn

Joined: Mar 16, 2007
Posts: 1
Hi,

I am using log4j 1.2.14 in my application for logging activity. I have configured JDBC appender in log4j.xml for MSSQL server table logging. In case of handling the database down scenario I have configured FallBackErrorHandler to log in to a temporary flat file.

There is a scenario where in the JDBCAppender goes down and FallBackErrorHandler comes in to picture due to database down case, from that point the FallBackErrorHandler takes responsibility of logging.

My requirement is to invoke the JDBCAppender as soon as the Database is up and running, but that's not the case as of now, even when the database is up the logging activity is carried out by the FallBackErrorHandler.

Is there any configuration what I can make in the log4j.xml ,are any other customization in the code, so that the logging is reverted back to the JDBCAppender as soon as the database is up and running.

Thanks,
Rajesh
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

Rajesh, welcome to JavaRanch.

Your question does not belong in the "Sun Certification Results" forum. I will move your question to a more appropriate forum. Please carefully choose a forum when you post a question.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j Revoking the JDBCAppender after the Database Connection has been established
 
Similar Threads
log4j JDBCAppender problem
Clustered Environment
New to log4j - need some advice
Log4J
Log4J - Appender.close()