mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 11:29:01 +08:00
Added the ability to truncate the basic file logger.
Added the ability to truncate the basic file logger.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user