Skip to content

Commit f355b3d

Browse files
committed
Fix test_daily_logger
1 parent ac432c3 commit f355b3d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/test_daily_logger.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ TEST_CASE("daily_logger with dateonly calculator", "[daily_logger]") {
4646

4747
struct custom_daily_file_name_calculator {
4848
static spdlog::filename_t calc_filename(const spdlog::filename_t &basename, const tm &now_tm) {
49-
filename_memory_buf_t w;
50-
spdlog::fmt_lib::format_to(std::back_inserter(w), SPDLOG_FILENAME_T("{}{:04d}{:02d}{:02d}"),
49+
50+
return spdlog::fmt_lib::format(SPDLOG_FILENAME_T("{}{:04d}{:02d}{:02d}"),
5151
basename, now_tm.tm_year + 1900, now_tm.tm_mon + 1,
52-
now_tm.tm_mday);
53-
54-
return SPDLOG_BUF_TO_STRING(w);
52+
now_tm.tm_mday);
5553
}
5654
};
5755

0 commit comments

Comments
 (0)