Enhance PSU tracing support - add device access info

Move file names for file errors to the journal message. Enhance usablility.

Logging messages for file errors contain the file names inside structured
entries rather than directly in the log message. This makes viewing errors
more difficult than need be. Before this change, the journal report needed to
be run with '-o verbose' to see the file names.

Tested: Ran unit tests. All successful
Tested:
* Changes to phosphor-power-supply/main.cpp were tested by running with the
  .json configuration file missing in either and both default locations.
* Change to loadJSONFromFile() in utility.cpp for an invalid file was tested by
  giving invalid  "psu_config.json" file to main program.
* Empty file message was tested by changing main() to allow loadJSONFromFile()
  to be called it when the file did not exist.
* Changes to other files were tested by running phosphor-power initialization
  and manipulating the code to force execution of various error paths.
* Methods that are changed but were not directly called by phosphor-power
  initialization:
   PMBus::readBit(), PMBus::readBinary() and PMBus::write().
   The changed log messages in these were tested by adding calls to them from
   PMBus::read() and then changing code to force execution through paths that
   created the log messages.

Signed-off-by: Jay Meyer <jaymeyer@us.ibm.com>
Change-Id: I1f0c01716495ac7022d5234e9a8dfdab8195c186
diff --git a/utility.cpp b/utility.cpp
index a55ffe8..7fdd6b2 100644
--- a/utility.cpp
+++ b/utility.cpp
@@ -51,9 +51,11 @@
     {
         if (logError)
         {
-            log<level::ERR>("Error in mapper response for getting service name",
-                            entry("PATH=%s", path.c_str()),
-                            entry("INTERFACE=%s", interface.c_str()));
+            log<level::ERR>(
+                std::string("Error in mapper response for getting service name "
+                            "PATH=" +
+                            path + " INTERFACE=" + interface)
+                    .c_str());
         }
         return std::string{};
     }
@@ -66,13 +68,19 @@
     std::ifstream ifs(path);
     if (!ifs.good())
     {
-        log<level::ERR>("Unable to open file", entry("PATH=%s", path));
+        log<level::ERR>(std::string("Unable to open file "
+                                    "PATH=" +
+                                    std::string(path))
+                            .c_str());
         return nullptr;
     }
     auto data = json::parse(ifs, nullptr, false);
     if (data.is_discarded())
     {
-        log<level::ERR>("Failed to parse json", entry("PATH=%s", path));
+        log<level::ERR>(std::string("Failed to parse json "
+                                    "PATH=" +
+                                    std::string(path))
+                            .c_str());
         return nullptr;
     }
     return data;