Commit 88ff3144 authored by gabime's avatar gabime

flush_help small change

parent f909caf3
......@@ -13,7 +13,7 @@ public:
_flush_every(flush_every),
_write_counter(0) {};
void write(std::ofstream& ofs, const bufpair_t& msg)
void write(const bufpair_t& msg, std::ofstream& ofs)
{
ofs.write(msg.first, msg.second);
if(++_write_counter == _flush_every)
......
......@@ -30,7 +30,7 @@ protected:
void _sink_it(const log_msg& msg) override
{
std::lock_guard<std::mutex> lock(_mutex);
_flush_helper.write(_ofstream, msg.msg_buf);
_flush_helper.write(msg.msg_buf, _ofstream);
}
private:
std::mutex _mutex;
......@@ -70,7 +70,7 @@ protected:
_rotate();
_current_size = msg.msg_buf.second;
}
_flush_helper.write(_ofstream, msg.msg_buf);
_flush_helper.write(msg.msg_buf, _ofstream);
}
......@@ -143,7 +143,7 @@ protected:
_ofstream.open(_calc_filename(_base_filename, _extension));
_midnight_tp = _calc_midnight_tp();
}
_flush_helper.write(_ofstream, msg.msg_buf);
_flush_helper.write(msg.msg_buf, _ofstream);
}
private:
......
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