ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Sterin" <>
Subject Removing logging from ivy
Date Wed, 24 Sep 2008 19:17:26 GMT
I'm using ivy embedded in a library.  Because the library encapsulates
everything, we wanted to remove all logging...

Doing this...

Ivy ivy = Ivy.newInstance();
MessageLogger logger = new DefaultMessageLogger(0);

Removes the logging, but the transfer listeners are currently not
removable from what I can see.  Because the default transfer handler
is pushed into the transfer handlers as an anonymous inner class,
there is no way to remove it, as all remove methods requires an
instance of the transfer listener to remove it.

public void removeAllTransferListeners() {
    for (TransferListener tl : listeners.getListeners(TransferListener.class)) {

I then just use...


which removes the transfer download progress notifications.

To be able to remove all listeners if needed.  This is a nice
solution, but I'm not sure if there is a better way to configure this.

Can this or a similar solution be added to ivy?

I'd also like to discuss refining an ivy API for external use.  I can
imagine systems using ivy to resolve deps outside of ant as we're



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

View raw message