mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-13 01:10:26 +08:00
Limit max number of rotating files to 200000, not max size
This commit is contained in:
parent
4c2ce2c82c
commit
a732a0dc85
@ -36,9 +36,9 @@ SPDLOG_INLINE rotating_file_sink<Mutex>::rotating_file_sink(
|
|||||||
throw_spdlog_ex("rotating sink constructor: max_size arg cannot be zero");
|
throw_spdlog_ex("rotating sink constructor: max_size arg cannot be zero");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max_size > 200000)
|
if (max_files > 200000)
|
||||||
{
|
{
|
||||||
throw_spdlog_ex("rotating sink constructor: max_size arg cannot exceed 200000");
|
throw_spdlog_ex("rotating sink constructor: max_files arg cannot exceed 200000");
|
||||||
}
|
}
|
||||||
file_helper_.open(calc_filename(base_filename_, 0));
|
file_helper_.open(calc_filename(base_filename_, 0));
|
||||||
current_size_ = file_helper_.size(); // expensive. called only once
|
current_size_ = file_helper_.size(); // expensive. called only once
|
||||||
|
Loading…
Reference in New Issue
Block a user