Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpuasonych <basargin.erik@gmail.com>2018-05-30 11:07:43 +0300
committerpuasonych <basargin.erik@gmail.com>2018-05-30 11:07:43 +0300
commit98b9cd38ec5d2d57f4109e3c703cc78e7c3fee2d (patch)
tree4ed7a4d34dffd951d892195155420e4363b566dc
parent877a6184008e1af7b17f936c2a1824d4ad6bca14 (diff)
Update step logger
-rw-r--r--include/spdlog/contrib/sinks/step_file_sink.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/spdlog/contrib/sinks/step_file_sink.h b/include/spdlog/contrib/sinks/step_file_sink.h
index f4a098d2..87f45f45 100644
--- a/include/spdlog/contrib/sinks/step_file_sink.h
+++ b/include/spdlog/contrib/sinks/step_file_sink.h
@@ -128,11 +128,15 @@ protected:
std::tie(new_filename, std::ignore) = FileNameCalc::calc_filename(_base_filename, _tmp_ext);
bool change_occured = !details::file_helper::file_exists(new_filename);
- if (change_occured) close_current_file();
+ if (change_occured)
+ {
+ close_current_file();
+
+ _current_filename = std::move(new_filename);
- _current_filename = std::move(new_filename);
+ _file_helper.open(_current_filename);
+ }
- _file_helper.open(_current_filename);
_tp = _next_tp();
if (change_occured)