Add fmtlib for phosphor-debug-collector
Call fmtlib to get additional information from journal.
Tested: built phosphor-debug-collector successfully
and Unit Test passes.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ibe65637a0b29b76269fb4bc3f498438901c9306a
diff --git a/ramoops_manager.cpp b/ramoops_manager.cpp
index a9f15c3..5fed14b 100644
--- a/ramoops_manager.cpp
+++ b/ramoops_manager.cpp
@@ -2,6 +2,8 @@
#include "ramoops_manager.hpp"
+#include <fmt/core.h>
+
#include <sdbusplus/exception.hpp>
namespace phosphor
@@ -53,8 +55,10 @@
catch (const sdbusplus::exception::SdBusError& e)
{
log<level::ERR>(
- "Failed to parse dump create message", entry("ERROR=%s", e.what()),
- entry("REPLY_SIG=%s", mapperResponseMsg.get_signature()));
+ fmt::format(
+ "Failed to parse dump create message, error({}), REPLY_SIG({})",
+ e.what(), mapperResponseMsg.get_signature())
+ .c_str());
return;
}
if (mapperResponse.empty())