Unified usage of fmt::memory_buffer across the codebase

This commit is contained in:
gabime 2019-08-28 18:50:11 +03:00
parent f5492aed12
commit 2eb52cd047
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@
void bench_formatter(benchmark::State &state, std::string pattern)
{
auto formatter = spdlog::details::make_unique<spdlog::pattern_formatter>(pattern);
fmt::memory_buffer dest;
spdlog::memory_buf_t dest;
std::string logger_name = "logger-name";
const char *text = "Hello. This is some message with length of 80 ";

View File

@ -102,7 +102,7 @@ TEST_CASE("daily_logger with dateonly calculator", "[daily_logger_dateonly]]")
// calculate filename (time based)
std::string basename = "logs/daily_dateonly";
std::tm tm = spdlog::details::os::localtime();
fmt::memory_buffer w;
spdlog::memory_buf_t w;
fmt::format_to(w, "{}_{:04d}-{:02d}-{:02d}", basename, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
auto logger = spdlog::create<sink_type>("logger", basename, 0, 0);
@ -120,7 +120,7 @@ struct custom_daily_file_name_calculator
{
static spdlog::filename_t calc_filename(const spdlog::filename_t &basename, const tm &now_tm)
{
fmt::memory_buffer w;
spdlog::memory_buf_t w;
fmt::format_to(w, "{}{:04d}{:02d}{:02d}", basename, now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday);
return fmt::to_string(w);
}
@ -134,7 +134,7 @@ TEST_CASE("daily_logger with custom calculator", "[daily_logger_custom]]")
// calculate filename (time based)
std::string basename = "logs/daily_dateonly";
std::tm tm = spdlog::details::os::localtime();
fmt::memory_buffer w;
spdlog::memory_buf_t w;
fmt::format_to(w, "{}{:04d}{:02d}{:02d}", basename, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
auto logger = spdlog::create<sink_type>("logger", basename, 0, 0);