mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-01 10:59:02 +08:00
replaced flush_interval with auto_flush boolean
This commit is contained in:
@@ -45,8 +45,8 @@ class simple_file_sink : public base_sink<Mutex>
|
||||
{
|
||||
public:
|
||||
explicit simple_file_sink(const std::string &filename,
|
||||
const std::size_t flush_inverval=0):
|
||||
_file_helper(flush_inverval)
|
||||
bool auto_flush=false):
|
||||
_file_helper(auto_flush)
|
||||
{
|
||||
_file_helper.open(filename);
|
||||
}
|
||||
@@ -72,13 +72,13 @@ class rotating_file_sink : public base_sink<Mutex>
|
||||
public:
|
||||
rotating_file_sink(const std::string &base_filename, const std::string &extension,
|
||||
std::size_t max_size, std::size_t max_files,
|
||||
std::size_t flush_inverval=0):
|
||||
bool auto_flush=false):
|
||||
_base_filename(base_filename),
|
||||
_extension(extension),
|
||||
_max_size(max_size),
|
||||
_max_files(max_files),
|
||||
_current_size(0),
|
||||
_file_helper(flush_inverval)
|
||||
_file_helper(auto_flush)
|
||||
{
|
||||
_file_helper.open(calc_filename(_base_filename, 0, _extension));
|
||||
}
|
||||
@@ -158,11 +158,11 @@ class daily_file_sink:public base_sink<Mutex>
|
||||
public:
|
||||
explicit daily_file_sink(const std::string& base_filename,
|
||||
const std::string& extension,
|
||||
const std::size_t flush_inverval=0):
|
||||
bool auto_flush=false):
|
||||
_base_filename(base_filename),
|
||||
_extension(extension),
|
||||
_midnight_tp (_calc_midnight_tp() ),
|
||||
_file_helper(flush_inverval)
|
||||
_file_helper(auto_flush)
|
||||
{
|
||||
_file_helper.open(calc_filename(_base_filename, _extension));
|
||||
}
|
||||
|
Reference in New Issue
Block a user