mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Compare commits
3 Commits
gabime/v1.
...
v1.15.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f355b3d58f | ||
![]() |
ac432c3602 | ||
![]() |
3c23c27d2d |
@@ -27,5 +27,4 @@
|
|||||||
#else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib
|
#else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <fmt/xchar.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -46,12 +46,10 @@ TEST_CASE("daily_logger with dateonly calculator", "[daily_logger]") {
|
|||||||
|
|
||||||
struct custom_daily_file_name_calculator {
|
struct custom_daily_file_name_calculator {
|
||||||
static spdlog::filename_t calc_filename(const spdlog::filename_t &basename, const tm &now_tm) {
|
static spdlog::filename_t calc_filename(const spdlog::filename_t &basename, const tm &now_tm) {
|
||||||
filename_memory_buf_t w;
|
|
||||||
spdlog::fmt_lib::format_to(std::back_inserter(w), SPDLOG_FILENAME_T("{}{:04d}{:02d}{:02d}"),
|
return spdlog::fmt_lib::format(SPDLOG_FILENAME_T("{}{:04d}{:02d}{:02d}"),
|
||||||
basename, now_tm.tm_year + 1900, now_tm.tm_mon + 1,
|
basename, now_tm.tm_year + 1900, now_tm.tm_mon + 1,
|
||||||
now_tm.tm_mday);
|
now_tm.tm_mday);
|
||||||
|
|
||||||
return SPDLOG_BUF_TO_STRING(w);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user