psusensors: Cleaning up debug and error wording

Rewords some misleading error messages
Adds additional test for failure to set property
Adds additional line for sensor value update
Sensor label head line now shows pairing

Tested: Output appears as expected on my machine

Change-Id: Ibb2ca0df23124120070ca47d4377942089dbbed7
Signed-off-by: Josh Lehan <krellan@google.com>
diff --git a/include/sensor.hpp b/include/sensor.hpp
index be17d4c..21474b1 100644
--- a/include/sensor.hpp
+++ b/include/sensor.hpp
@@ -142,7 +142,10 @@
         {
             // Indicate that it is internal set call
             internalSet = true;
-            sensorInterface->set_property("Value", newValue);
+            if (!(sensorInterface->set_property("Value", newValue)))
+            {
+                std::cerr << "error setting property to " << newValue << "\n";
+            }
             internalSet = false;
             double diff = std::abs(value - newValue);
             if (std::isnan(diff) || diff > hysteresis)
diff --git a/src/PSUSensor.cpp b/src/PSUSensor.cpp
index e18f739..c5e8e35 100644
--- a/src/PSUSensor.cpp
+++ b/src/PSUSensor.cpp
@@ -118,6 +118,11 @@
             }
             if (static_cast<double>(nvalue) != value)
             {
+                if constexpr (DEBUG)
+                {
+                    std::cerr << "Update " << path << " from " << value
+                              << " to " << nvalue << "\n";
+                }
                 updateValue(nvalue);
             }
             errCount = 0;
diff --git a/src/PSUSensorMain.cpp b/src/PSUSensorMain.cpp
index 1c76cef..2eb280f 100644
--- a/src/PSUSensorMain.cpp
+++ b/src/PSUSensorMain.cpp
@@ -287,7 +287,9 @@
 
             if ((*confBus != bus) || (*confAddr != addr))
             {
-                std::cerr << "Configuration mismatch of bus or addr\n";
+                std::cerr << "Configuration skipping " << *confBus << "-"
+                          << *confAddr << " because not " << bus << "-" << addr
+                          << "\n";
                 continue;
             }
 
@@ -369,7 +371,8 @@
             std::ifstream labelFile(labelPath);
             if (!labelFile.good())
             {
-                std::cerr << "Failure reading " << sensorPath << "\n";
+                std::cerr << "Input file " << sensorPath
+                          << " has no corresponding label file\n";
                 labelHead = sensorNameStr.substr(0, sensorNameStr.find("_"));
             }
             else
@@ -386,11 +389,6 @@
                 labelHead = label.substr(0, label.find(" "));
             }
 
-            if constexpr (DEBUG)
-            {
-                std::cerr << "Sensor label head " << labelHead << "\n";
-            }
-
             checkPWMSensor(sensorPath, labelHead, *interfacePath, objectServer,
                            psuNames[0]);
 
@@ -441,6 +439,12 @@
                 continue;
             }
 
+            if constexpr (DEBUG)
+            {
+                std::cerr << "Sensor label head " << labelHead
+                          << " paired with " << psuNames[nameIndex] << "\n";
+            }
+
             checkEventLimits(sensorPathStr, limitEventMatch, eventPathList);
 
             unsigned int factor =