Simplify daily sink filename creation
This commit is contained in:
parent
2af5eea2c6
commit
5988895d69
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user