ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Avoiding logging loops
Date Tue, 11 Jan 2005 17:17:43 GMT
On Tue, 11 Jan 2005, Ceki Gülc <> wrote:

> I can't think of anything reasonable Log4jListener can do to prevent
> this or dance around it.

The only idea I came up with was temporarily re-setting System.out and
err.  Facing the choice between cholera and pestilence, I'd rather
silently ignore the recursive invocation than do that.

> The hypothesis of all listeners being able to avoid accessing the
> console from within the messageLogged(event) method is not verified
> in this case.

Yes, I understand that - and I don't think we can really enforce it,
at least not after we've had BuildListener not state that requirement
for more than four years.

> At this stage, log4j's behavior might seem quite strange but at
> least you should be aware that such eccentricity exists.

Absolutely, thanks for the heads-up.  We definitively need to deal
with it in some way or our own Log4jListener becomes useless.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message