Direct all diagnostic output to stderr.
Per posix all diagnostic messages should go to stderr. This avoids incorrect ordering in diagnostic messages.
@@ -160,15 +160,12 @@ public class Problems {
public void abortWhenPossible() {
abortRequested = true;
}
+
/** Prints all error messages and a summary. */
public void report(PrintStream outputStream, PrintStream errorStream) {
for (Map.Entry<Severity, String> severityMessagePair : problemsBySeverity.entries()) {
- if (severityMessagePair.getKey() == Severity.INFO) {
- outputStream.println(severityMessagePair.getValue());
- } else {
errorStream.println(severityMessagePair.getValue());
}
- }
if (hasErrors() || hasWarnings()) {
J2clUtils.printf(
errorStream,
