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

@@ -55,15 +55,15 @@ public:
}
protected:
void sink_it_(const details::log_msg &msg) override
void sink_it_(const details::log_msg &, const fmt::memory_buffer &formatted) override
{
current_size_ += msg.formatted.size();
current_size_ += formatted.size();
if (current_size_ > max_size_)
{
rotate_();
current_size_ = msg.formatted.size();
current_size_ = formatted.size();
}
file_helper_.write(msg);
file_helper_.write(formatted);
}
void flush_() override