Mercurial > hg > truffle
changeset 6759:145ffab733e7
7199082: write warning messages to stderr
Reviewed-by: ysr, dholmes, sla
author | jcoomes |
---|---|
date | Thu, 20 Sep 2012 16:27:51 -0700 |
parents | 46b3b2dd84db |
children | 5f54277c67f7 |
files | src/share/vm/utilities/debug.cpp |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/utilities/debug.cpp Thu Sep 20 13:49:27 2012 -0700 +++ b/src/share/vm/utilities/debug.cpp Thu Sep 20 16:27:51 2012 -0700 @@ -101,14 +101,13 @@ void warning(const char* format, ...) { if (PrintWarnings) { - // In case error happens before init or during shutdown - if (tty == NULL) ostream_init(); - - tty->print("%s warning: ", VM_Version::vm_name()); + FILE* const err = defaultStream::error_stream(); + jio_fprintf(err, "%s warning: ", VM_Version::vm_name()); va_list ap; va_start(ap, format); - tty->vprint_cr(format, ap); + vfprintf(err, format, ap); va_end(ap); + fputc('\n', err); } if (BreakAtWarning) BREAKPOINT; }