From: 胡玮文 Date: Sun, 19 Dec 2021 06:47:20 +0000 (+0800) Subject: common: fix fmt::format_to deprecated warning X-Git-Tag: v17.1.0~178^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=620f1ef06110e3d01f4eca3c3156722b1a67557f;p=ceph.git common: fix fmt::format_to deprecated warning Signed-off-by: 胡玮文 --- 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={}