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_main.cpp b/ramoops_manager_main.cpp
index 6a06386..e352a2d 100644
--- a/ramoops_manager_main.cpp
+++ b/ramoops_manager_main.cpp
@@ -2,6 +2,8 @@
#include "ramoops_manager.hpp"
+#include <fmt/core.h>
+
#include <phosphor-logging/elog-errors.hpp>
int main()
@@ -9,8 +11,10 @@
fs::path filePath(SYSTEMD_PSTORE_PATH);
if (!fs::exists(filePath))
{
- log<level::ERR>("Pstore file path is not exists",
- entry("FILE_PATH = %s", SYSTEMD_PSTORE_PATH));
+ log<level::ERR>(
+ fmt::format("Pstore file path is not exists, FILE_PATH({})",
+ SYSTEMD_PSTORE_PATH)
+ .c_str());
return EXIT_FAILURE;
}