8046148: JEP 158: Unified JVM Logging

Reviewed-by: coleenp, sla
This commit is contained in:
Marcus Larsson 2015-09-24 12:36:04 +02:00
parent 0835a6e311
commit 3c2211a492
39 changed files with 2842 additions and 6 deletions

View file

@ -1440,3 +1440,14 @@ bool networkStream::connect(const char *ip, short port) {
}
#endif
void logStream::write(const char* s, size_t len) {
if (len > 0 && s[len - 1] == '\n') {
_current_line.write(s, len - 1);
_log_func(_current_line.as_string());
_current_line.reset();
} else {
_current_line.write(s, len);
update_position(s, len);
}
}