From 620f1ef06110e3d01f4eca3c3156722b1a67557f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=83=A1=E7=8E=AE=E6=96=87?= Date: Sun, 19 Dec 2021 14:47:20 +0800 Subject: [PATCH] common: fix fmt::format_to deprecated warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: 胡玮文 --- src/common/Journald.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/Journald.cc b/src/common/Journald.cc index 5207608d1a313..e3ae2d358f402 100644 --- a/src/common/Journald.cc +++ b/src/common/Journald.cc @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -107,7 +108,7 @@ class EntryEncoder : public EntryEncoderBase { void encode(const Entry& e, const SubsystemMap *s) { meta_buf.clear(); - fmt::format_to(meta_buf, + fmt::format_to(std::back_inserter(meta_buf), R"(PRIORITY={:d} CEPH_SUBSYS={} TIMESTAMP={} @@ -138,7 +139,7 @@ class LogEntryEncoder : public EntryEncoderBase { void encode(const LogEntry& le) { meta_buf.clear(); - fmt::format_to(meta_buf, + fmt::format_to(std::back_inserter(meta_buf), R"(PRIORITY={:d} TIMESTAMP={} CEPH_NAME={} -- 2.39.5