Ceki,

I've looked at the code and how the design works.

I do not believe ErrorHandler.setAppender(Appender) should be public/for use by
a log4j user.
It should only be accessible to the Appender that passed the ErrorHandler
object.

As an Appender may have an alternative ErrorHandler ( the default is
OnlyOnceErrorHandler) specified, it should inform the errorHandler object of
itself to fulfill the bi-directional relationship.
e.g.
public void  Appender.setErrorHandler( ErrorHandler errorHandler)
+AHs-
    errorHandler.setAppender( this )+ADs-
    this.errorHandler +AD0- errorHandler+ADs-
+AH0-


Allowing the primary appender to then be modified by a log4j user would break
the relationship IMHO.
Only the backup appender should need be specified to fulfill the requirements
(of FallBackHanlder).

Of course, this would mean moving ErrorHandler to the same package as Appender
though. Bad no doubt as it would break existing code.  Alternatively, the method
could be javadocced to state that it should not be used.

Regards,

T Master


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to