From 4fe730d58a1367cec336d9ca144c5fba3b3f0336 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Sun, 3 Nov 2019 12:50:15 +0530 Subject: [PATCH] log: there is no need to flush the log buf The m_log_buf just a buffer for the log messages in _flush() before flushing them to the log files and the buffer should already be emptied by the _flush() routine. It makes no sense to flush the empty buffer again here. Signed-off-by: Xiubo Li --- src/log/Log.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/log/Log.cc b/src/log/Log.cc index 10cc60bda1a..6a1f40f51da 100644 --- a/src/log/Log.cc +++ b/src/log/Log.cc @@ -345,7 +345,6 @@ void Log::dump_recent() } _flush(m_flush, false); - _flush_logbuf(); _log_message("--- begin dump of recent events ---", true); { @@ -375,7 +374,7 @@ void Log::dump_recent() _log_message("--- end dump of recent events ---", true); - _flush_logbuf(); + assert(m_log_buf.empty()); m_flush_mutex_holder = 0; } -- 2.39.5