< prev index next >
src/share/vm/logging/logStream.cpp
Print this page
rev 13106 : imported patch 8181917-refactor-ul-logstream-alt1-api-changes
*** 22,34 ****
*
*/
#include "precompiled.hpp"
#include "logging/log.hpp"
! #include "logging/logStream.inline.hpp"
! // Create a log stream without an embedded ResourceMark.
! // The function is placed here to be called out-of-line in log.hpp.
! outputStream* create_log_stream(LogLevelType level, LogTagSet* tagset) {
! return new LogStreamNoResourceMark(level, tagset);
}
--- 22,40 ----
*
*/
#include "precompiled.hpp"
#include "logging/log.hpp"
! #include "logging/logStream.hpp"
! void LogStream::write(const char* s, size_t len) {
! if (len > 0 && s[len - 1] == '\n') {
! _current_line.write(s, len - 1);
! _current_line.write("\0", 1);
! _log_handle.print("%s", _current_line.base());
! _current_line.reset();
! } else {
! _current_line.write(s, len);
! }
! update_position(s, len);
}
< prev index next >