Use s.c_str() in log messages

Fixes issues with data passed to phosphor::logging::log(entry()).
This is part of a series of commits that resolves openbmc 2905.

Tested: static_assert only

Change-Id: I9fac771f54e4acbec97ce1360c106b6e3eb4fe9d
Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
diff --git a/dcmihandler.cpp b/dcmihandler.cpp
index be3e27e..d4f0ff5 100644
--- a/dcmihandler.cpp
+++ b/dcmihandler.cpp
@@ -1110,7 +1110,7 @@
     catch (std::exception& e)
     {
         log<level::INFO>("Failure to read power value from D-Bus object",
-                        entry("OBJECT_PATH=%s", objectPath),
+                        entry("OBJECT_PATH=%s", objectPath.c_str()),
                         entry("INTERFACE=%s", SENSOR_VALUE_INTF));
     }
     return power;