diff --git a/include/spdlog/sinks/rotating_file_sink_extended.h b/include/spdlog/sinks/rotating_file_sink_extended.h index 8a651f45..969e9dc8 100644 --- a/include/spdlog/sinks/rotating_file_sink_extended.h +++ b/include/spdlog/sinks/rotating_file_sink_extended.h @@ -13,6 +13,7 @@ #include "spdlog/details/null_mutex.h" #include "spdlog/fmt/fmt.h" #include "spdlog/sinks/base_sink.h" +#include "spdlog/sinks/daily_file_sink.h" #include #include @@ -101,6 +102,11 @@ private: fmt::format_to(wt, SPDLOG_FILENAME_T("{}_{}{}"), basename, formated_time(), ext); filename = fmt::to_string(wt); } + else + { + auto now = log_clock::now(); + filename = daily_filename_calculator::calc_filename(base_filename_, now); + } if (index != 0u) {