I don't agree that one case justifies a different handling.  I'll just use the
ErrorHandler if my JDBCAppender throws an SQLException.

Thank you for the explanation,
Kevin


Ceki Gülcü wrote:

> Kevin,
>
> In the latest log4j release (1.0.4), the FileAppender consistently uses its
> errorHandler to report errors. It uses LogLog.error only once within the
> closeWriterIfOurs method. This method is copied below:
>
>    /**
>       Close this.writer if opened by setFile or FileAppend(filename..)
>    */
>    protected
>    void closeWriterIfOurs() {
>      if(this.qwIsOurs && this.qw != null) {
>        try {
>             this.qw.close();
>        }
>        catch(java.io.IOException e) {
>          LogLog.error("Could not close output stream " + qw, e);
>        }
>      }
>    }
>
> The rationale being that the user probably does not want to trigger a
> possibly heavy error handling mechanism in case of an error while closing a
> java.io.Writer. This is perhaps too smart an approach to do good. However,
> I would hardly call it *madness*. I hope that this makes better sense. Ceki
>
> At 15:05 26.01.2001 -0800, you wrote:
> >I was looking at FileAppender for an example of how to report errors
> >from inside an
> >Appender.  Sometimes it calls errorHandler.error(...) and sometimes
> >LogLog.error(...).  Could someone explain the method in this madness?
> >
> >Kevin
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
> ----
> Ceki Gülcü - Independent IT Consultant
>
> av. de Rumine 5            Tel: ++41 21 351 23 15
> CH-1005 Lausanne        e-mail: [EMAIL PROTECTED]  or
> Switzerland                     [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to