You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leo Sutic <le...@inspireinfrastructure.com> on 2003/02/26 11:03:11 UTC

LogKit LogTargets

All,

when I wrap one InputStream in another in Java:

  InputStream is = new BufferedInputStream( new FileInputStream (...) );

I know that is.close() will close the underlying FileInputStream.

When a LogTarget wraps another:

  LogTarget lt = new AsyncLogTarget( new MyLogTarget( ... ));

Closing the wrapping log target does not close the underlying target.

Is this:

 a. right

 b. wrong

?

If (b) do we: Add a method close() to the LogTarget interface?

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: LogKit LogTargets

Posted by Peter Donald <pe...@realityforge.org>.
On Wed, 26 Feb 2003 21:03, Leo Sutic wrote:
> Closing the wrapping log target does not close the underlying target.
>
> Is this:
>
>  a. right
>
>  b. wrong
>
> ?

It was intentional .. whether that is right or wrong is up to debate.

> If (b) do we: Add a method close() to the LogTarget interface?

I would prefer that we add a 

package org.apache.log.util;

interface Closeable
{
  void close();
}

I think I have a fork of logkit that actually has this ... will go looking and 
see ...

-- 
Cheers,

Peter Donald
---------------------------------------------------------
Clarke's Third Law: "Any technology distinguishable from 
magic is insufficiently advanced".
---------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org