Commit 5988895d authored by gabime's avatar gabime

Simplify daily sink filename creation

parent 2af5eea2
......@@ -30,10 +30,7 @@ struct daily_filename_calculator
{
filename_t basename, ext;
std::tie(basename, ext) = details::file_helper::split_by_extension(filename);
std::conditional<std::is_same<filename_t::value_type, char>::value, memory_buf_t, fmt::wmemory_buffer>::type w;
fmt::format_to(
w, SPDLOG_FILENAME_T("{}_{:04d}-{:02d}-{:02d}{}"), basename, now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday, ext);
return fmt::to_string(w);
return fmt::format(SPDLOG_FILENAME_T("{}_{:04d}-{:02d}-{:02d}{}"), basename, now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday, ext);
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment