pattern per sink and pattern caching

This commit is contained in:
gabime
2018-06-24 01:32:39 +03:00
parent 9d7a5c253a
commit 0c19bdd772
24 changed files with 349 additions and 270 deletions

View File

@@ -76,14 +76,14 @@ public:
}
protected:
void sink_it_(const details::log_msg &msg) override
void sink_it_(const details::log_msg &, const fmt::memory_buffer &formatted) override
{
if (std::chrono::system_clock::now() >= rotation_tp_)
{
file_helper_.open(FileNameCalc::calc_filename(base_filename_));
rotation_tp_ = next_rotation_tp_();
}
file_helper_.write(msg);
file_helper_.write(formatted);
}
void flush_() override