Fix wrong fmt::format strings

If the `openpower-dumps-extension` enabled, found the wrong
fmt::format strings, and CI failed.

Tested: enabled `openpower-dumps-extension` and built
phosphor-debug-collector successfully.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I9cfc4966658d611b5e9be48a1a5e6e3e3def63f0
diff --git a/dump-extensions/openpower-dumps/dump_manager_system.cpp b/dump-extensions/openpower-dumps/dump_manager_system.cpp
index 0288788..531cde8 100644
--- a/dump-extensions/openpower-dumps/dump_manager_system.cpp
+++ b/dump-extensions/openpower-dumps/dump_manager_system.cpp
@@ -62,7 +62,7 @@
             fmt::format(
                 "Error in creating system dump entry, errormsg({}), "
                 "OBJECTPATH({}), ID({}), TIMESTAMP({}),SIZE({}), SOURCEID({})",
-                e.what(), objPath, id, timeStamp, size, dumpId)
+                e.what(), objPath.c_str(), id, timeStamp, size, dumpId)
                 .c_str());
         report<InternalFailure>();
         return;
@@ -120,7 +120,7 @@
         log<level::ERR>(
             fmt::format("Error in creating system dump entry, errormsg({}), "
                         "OBJECTPATH({}), ID({})",
-                        e.what(), objPath, id)
+                        e.what(), objPath.c_str(), id)
                 .c_str());
         elog<InternalFailure>();
         return std::string();