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 da...@hic.gov.au on 2001/10/17 10:01:43 UTC

Use of Error Handlers within Log4j


I have been looking for a logging framework which will notify the client
application when logging fails (fail-safe). I note that the documentation
describes Log4j as "It is a best-effort and fail-stop logging system".

My understanding is that Appenders can override the ErrorHandler but that
Configurators do not allow this (ie they use the default LogLog error
handler ). To achieve fail-safe operations when appending, the custom error
handler could easily raise a run-time exception that will be passed back to
the client.

Firstly, has anyone done this successfully? (I have not looked enough into
the Log4j source code to verify that the run-time exception will actaully
pass through all the intervening code and reach the client so please
correct me if I am wrong on this point).

Secondly, has adding the ability to specify an error handler for
Configurators been considered in the past and rejected and, if so, what
were the reasons? Could the failure to configure properly cause logging to
fail-stop rather than fail-safe even if using the custom error ahdnler
described above?



****************************************************************
NOTICE - This message is intended only for the use of the 
addressee named above and may contain privileged and 
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not 
disseminate, copy or take any action based upon it.  If you 
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.
****************************************************************

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