project.log("removing current logger", Project.MSG_DEBUG);
// since DefaultLogger doesn't offer any way to get the out / err print
// streams we should use reflection
// TODO: we should find a better way to do this
for (Iterator<?> i = project.getBuildListeners().iterator(); i.hasNext();) {
BuildListener l = (BuildListener) i.next();
if (l instanceof DefaultLogger) {
try {
Field fieldOut = DefaultLogger.class.getDeclaredField("out");
fieldOut.setAccessible(true);
out = (PrintStream) fieldOut.get(l);