/** * Handles error output sent to System.err by this task or its real task. * * @param output The error output to log. Should not be <code>null</code>. */ protected void handleErrorOutput(String output) { if (realThing instanceof Task) { ((Task) realThing).handleErrorOutput(output); } else { super.handleErrorOutput(output); } }
/** * Handles an error line by logging it with the WARN priority. * * @param output The error output to log. Should not be <code>null</code>. * * @since Ant 1.5.2 */ protected void handleErrorFlush(String output) { handleErrorOutput(output); }
/** * Pass output sent to System.err to the new project. * * @param output The error output to log. Should not be <code>null</code>. * * @since Ant 1.6.2 */ @Override public void handleErrorOutput(String output) { if (ant != null) { ant.handleErrorOutput(output); } else { super.handleErrorOutput(output); } }
/** * Handle error output. * Send it the the new project if is present, otherwise * call the super class. * @param output The string to output. * * @see Task#handleErrorOutput(String) * @since Ant 1.5 */ public void handleErrorOutput(String output) { if (callee != null) { callee.handleErrorOutput(output); } else { super.handleErrorOutput(output); } }
/** * Handle error output. * Send it the the new project if is present, otherwise * call the super class. * @param errorOutputToHandle The string to output. * * @see Task#handleErrorOutput(String) * @since Ant 1.5 */ @Override public void handleErrorOutput(String errorOutputToHandle) { if (newProject != null) { newProject.demuxOutput(errorOutputToHandle, true); } else { super.handleErrorOutput(errorOutputToHandle); } }
/** * Handle output sent to System.err. * * @param output string of stderr. * * @since Ant 1.5 */ @Override protected void handleErrorOutput(String output) { if (redirector.getErrorStream() != null) { redirector.handleErrorOutput(output); } else { super.handleErrorOutput(output); } }
/** * Demultiplex output so that each task receives the appropriate * messages. If the current thread is not currently executing a task, * the message is logged directly. * * @param output Message to handle. Should not be <code>null</code>. * @param isWarning Whether the text represents an warning (<code>true</code>) * or information (<code>false</code>). */ public void demuxOutput(final String output, final boolean isWarning) { final Task task = getThreadTask(Thread.currentThread()); if (task == null) { log(output, isWarning ? MSG_WARN : MSG_INFO); } else if (isWarning) { task.handleErrorOutput(output); } else { task.handleOutput(output); } }
/** * Pass output sent to System.err to the TestRunner so it can * collect it for the formatters. * * @param output output coming from System.err * @since Ant 1.5 */ @Override public void handleErrorOutput(final String output) { if (runner != null) { runner.handleErrorOutput(output); if (showOutput) { super.handleErrorOutput(output); } } else { super.handleErrorOutput(output); } }