From bd759bfca7148a5f93d4161bc61a1878731f6259 Mon Sep 17 00:00:00 2001 From: gabime Date: Thu, 5 Jul 2018 16:34:20 +0300 Subject: [PATCH] removed force_flush from simple logger --- include/spdlog/sinks/simple_file_sink.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/include/spdlog/sinks/simple_file_sink.h b/include/spdlog/sinks/simple_file_sink.h index 5af863dc..f9e68b95 100644 --- a/include/spdlog/sinks/simple_file_sink.h +++ b/include/spdlog/sinks/simple_file_sink.h @@ -22,24 +22,16 @@ class simple_file_sink SPDLOG_FINAL : public base_sink { public: explicit simple_file_sink(const filename_t &filename, bool truncate = false) - : force_flush_(false) { file_helper_.open(filename, truncate); } - void set_force_flush(bool force_flush) - { - force_flush_ = force_flush; - } + protected: void sink_it_(const details::log_msg &, const fmt::memory_buffer &formatted) override { file_helper_.write(formatted); - if (force_flush_) - { - file_helper_.flush(); - } } void flush_() override @@ -49,7 +41,6 @@ protected: private: details::file_helper file_helper_; - bool force_flush_; }; using simple_file_sink_mt = simple_file_sink;