Return-Path: Mailing-List: contact log4j-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list log4j-user@jakarta.apache.org Received: (qmail 28016 invoked from network); 29 Jan 2001 13:30:46 -0000 Received: from monterosa.urbanet.ch (195.202.193.104) by h31.sny.collab.net with SMTP; 29 Jan 2001 13:30:46 -0000 Received: (qmail 24346 invoked from network); 29 Jan 2001 13:30:45 -0000 Received: from unknown (HELO gil.urbanet.ch) (195.202.201.214) by monterosa.urbanet.ch with SMTP; 29 Jan 2001 13:30:45 -0000 Message-Id: <5.0.0.25.0.20010129141551.00b036e0@mail.urbanet.ch> X-Sender: urba19978@mail.urbanet.ch X-Mailer: QUALCOMM Windows Eudora Version 5.0 Date: Mon, 29 Jan 2001 14:32:04 +0100 To: "LOG4J Users Mailing List" From: Ceki =?iso-8859-1?Q?G=FClc=FC?= Subject: Re: Error reporting from inside an Appender Cc: Kevin Steppe In-Reply-To: <3A7202BE.6E660055@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Kevin, In the latest log4j release (1.0.4), the FileAppender consistently uses its= =20 errorHandler to report errors. It uses LogLog.error only once within the=20 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 !=3D 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=20 possibly heavy error handling mechanism in case of an error while closing a= =20 java.io.Writer. This is perhaps too smart an approach to do good. However,= =20 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: log4j-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: log4j-user-help@jakarta.apache.org ---- Ceki G=FClc=FC - Independent IT Consultant av. de Rumine 5 Tel: ++41 21 351 23 15 CH-1005 Lausanne e-mail: cgu@urbanet.ch or Switzerland ceki_gulcu@yahoo.com