Added the ability to truncate the basic file logger.

Added the ability to truncate the basic file logger.
This commit is contained in:
Sam Brkopac
2016-08-22 13:31:43 -07:00
parent 332b7c0d7f
commit 0be736c7fc
3 changed files with 9 additions and 8 deletions

View File

@@ -30,10 +30,11 @@ class simple_file_sink : public base_sink < Mutex >
{
public:
explicit simple_file_sink(const filename_t &filename,
bool force_flush = false) :
bool force_flush = false,
bool truncate = false) :
_file_helper(force_flush)
{
_file_helper.open(filename);
_file_helper.open(filename, truncate);
}
void flush() override
{