|
|
|
@ -33,10 +33,7 @@ public:
|
|
|
|
|
{
|
|
|
|
|
_file_helper.open(filename, truncate);
|
|
|
|
|
}
|
|
|
|
|
void flush() override
|
|
|
|
|
{
|
|
|
|
|
_file_helper.flush();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set_force_flush(bool force_flush)
|
|
|
|
|
{
|
|
|
|
|
_force_flush = force_flush;
|
|
|
|
@ -49,6 +46,10 @@ protected:
|
|
|
|
|
if(_force_flush)
|
|
|
|
|
_file_helper.flush();
|
|
|
|
|
}
|
|
|
|
|
void _flush() override
|
|
|
|
|
{
|
|
|
|
|
_file_helper.flush();
|
|
|
|
|
}
|
|
|
|
|
private:
|
|
|
|
|
details::file_helper _file_helper;
|
|
|
|
|
bool _force_flush;
|
|
|
|
@ -76,10 +77,6 @@ public:
|
|
|
|
|
_current_size = _file_helper.size(); //expensive. called only once
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void flush() override
|
|
|
|
|
{
|
|
|
|
|
_file_helper.flush();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void _sink_it(const details::log_msg& msg) override
|
|
|
|
@ -93,6 +90,11 @@ protected:
|
|
|
|
|
_file_helper.write(msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _flush() override
|
|
|
|
|
{
|
|
|
|
|
_file_helper.flush();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static filename_t calc_filename(const filename_t& filename, std::size_t index)
|
|
|
|
|
{
|
|
|
|
@ -194,10 +196,6 @@ public:
|
|
|
|
|
_file_helper.open(FileNameCalc::calc_filename(_base_filename));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void flush() override
|
|
|
|
|
{
|
|
|
|
|
_file_helper.flush();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void _sink_it(const details::log_msg& msg) override
|
|
|
|
@ -210,6 +208,11 @@ protected:
|
|
|
|
|
_file_helper.write(msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _flush() override
|
|
|
|
|
{
|
|
|
|
|
_file_helper.flush();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::chrono::system_clock::time_point _next_rotation_tp()
|
|
|
|
|
{
|
|
|
|
|