mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8046148: JEP 158: Unified JVM Logging
Reviewed-by: coleenp, sla
This commit is contained in:
parent
0835a6e311
commit
3c2211a492
39 changed files with 2842 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue