protected @Override ExecuteStreamHandler getExecuteStreamHandler(InputStream input) { return handler = new RedirectingStreamHandler( // stdout goes to the changelog parser, // but we also send this to Ant logger so that we can see it at sufficient debug level new ForkOutputStream(new RedirectingOutputStream(parser), new LogOutputStream(this, Project.MSG_VERBOSE)), // stderr goes to the logger, too new LogOutputStream(this, Project.MSG_WARN), input); }
String getErrors() { try { final ByteArrayOutputStream error = (ByteArrayOutputStream) getErr(); return error.toString("ASCII"); } catch (final Exception e) { return null; } }
super.execute(); } finally { final String errors = handler.getErrors();
protected @Override ExecuteStreamHandler getExecuteStreamHandler(InputStream input) { return handler = new RedirectingStreamHandler( // stdout goes to the changelog parser, // but we also send this to Ant logger so that we can see it at sufficient debug level new ForkOutputStream(new RedirectingOutputStream(parser), new LogOutputStream(this, Project.MSG_VERBOSE)), // stderr goes to the logger, too new LogOutputStream(this, Project.MSG_WARN), input); }
String getErrors() { try { final ByteArrayOutputStream error = (ByteArrayOutputStream) getErr(); return error.toString("ASCII"); } catch (final Exception e) { return null; } }
super.execute(); } finally { final String errors = handler.getErrors();