Skip to content

Commit

Permalink
[core] Avoid logger flush at every write (ray-project#50722)
Browse files Browse the repository at this point in the history
Signed-off-by: dentiny <dentinyhao@gmail.com>
  • Loading branch information
dentiny authored Feb 19, 2025
1 parent 179af97 commit b03a45e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ray/util/spdlog_newliner_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class spdlog_newliner_sink final : public spdlog::sinks::base_sink<Mutex> {
spdlog::details::log_msg new_log_msg;
new_log_msg.payload = std::string_view{cur_message.data(), cur_message.length()};
internal_sink_->log(new_log_msg);
internal_sink_->flush();
}
internal_sink_->flush();

// If the last character for payload is already newliner, we've already flushed out
// everything; otherwise need to keep left bytes in buffer.
Expand Down

0 comments on commit b03a45e

Please sign in to comment.