• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

log4j Revoking the JDBCAppender after the Database Connection has been established

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic