logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicko Cadell" <ni...@neoworks.com>
Subject RE: Fallback
Date Sat, 03 Sep 2005 10:36:09 GMT
Fallback between appenders is not currently supported by the log4net
framework.

It should be possible to write a custom appender that does what you
want. It could hold on to 3 separate appenders and hold an internal
state as to which appender it should forward to. If the appender it is
forwarding to fails it could then try the next appender. 

Nicko

> -----Original Message-----
> From: Thomas [mailto:tom@tomwindows.com] 
> Sent: 02 September 2005 22:12
> To: log4net-user@logging.apache.org
> Subject: Fallback
> 
> Is there a way to setup log4net to do fallback logging? I 
> only really ever want to write to the database log. However, 
> in case of an error writing to the database, I want the 
> connection error *and* the original error written to the 
> local event log. Should that fail, I want all three (database 
> connection error, error writing to the event log and the 
> original error) written to a local text file and all errors 
> from then on (until the application is restarted) should 
> simply write to the text file. However, it is fine if will 
> continue to try all three.
> 
>  
> 
>  
> 
> Thomas
> 
> 

Mime
View raw message