You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Sanjeev Sahay <sa...@nucleussoftware.com> on 2003/06/06 10:59:17 UTC

How to switch appender in case of runtime exception

Hi,

Can anybody tell me how to log into file in case of Database problem (like
Database server is down)? I'm using JdbcAppender for logging into database.
Need to divert the logging to file in case of any exception while logging to
Database. How to go about this?

Regards,

Sanjeev


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: How to switch appender in case of runtime exception

Posted by Avner BenHanoch <av...@kinor.com>.
try myLogger.removeAllAppenders() and then myLogger.addAppender(...)

----- Original Message -----
From: "Sanjeev Sahay" <sa...@nucleussoftware.com>
To: <lo...@jakarta.apache.org>
Sent: Friday, June 06, 2003 10:59 AM
Subject: How to switch appender in case of runtime exception


> Hi,
>
> Can anybody tell me how to log into file in case of Database problem (like
> Database server is down)? I'm using JdbcAppender for logging into
database.
> Need to divert the logging to file in case of any exception while logging
to
> Database. How to go about this?
>
> Regards,
>
> Sanjeev
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org