flush_help small change

This commit is contained in:
gabime 2014-03-28 16:13:41 +03:00
parent f909caf38b
commit 88ff314416
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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: