Rollup merge of #37066 - nrc:stderr, r=alexcrichton

Error monitor should emit error to stderr instead of stdout

We are pretty consistent about emitting to stderr, except for when there is actually an error, in which case we emit to stdout. This seems a bit backwards. This PR just changes that exception to emit to stderr. This is useful for the RLS since the LS protocol uses stdout (grrr).

r? @alexcrichton
This commit is contained in:
Alex Crichton 2016-10-12 10:15:28 -07:00
commit 920f10950a

View File

@ -1110,7 +1110,7 @@ pub fn monitor<F: FnOnce() + Send + 'static>(f: F) {
errors::Level::Note);
}
println!("{}", str::from_utf8(&data.lock().unwrap()).unwrap());
writeln!(io::stderr(), "{}", str::from_utf8(&data.lock().unwrap()).unwrap()).unwrap();
}
exit_on_err();