Commit bd759bfc authored by gabime's avatar gabime

removed force_flush from simple logger

parent 4a90950f
......@@ -22,24 +22,16 @@ class simple_file_sink SPDLOG_FINAL : public base_sink<Mutex>
{
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<std::mutex>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment