psu-ng: inventoryPath in updatePresence fail
If the updatePresence() function fails on the getPresence() function
call, include the inventoryPath string in the message logged to the
journal.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: I91e361fe404c01cf39e51e7f03f934bf945179a6
diff --git a/phosphor-power-supply/power_supply.cpp b/phosphor-power-supply/power_supply.cpp
index 82bd9aa..9c3af70 100644
--- a/phosphor-power-supply/power_supply.cpp
+++ b/phosphor-power-supply/power_supply.cpp
@@ -5,6 +5,8 @@
#include "types.hpp"
#include "util.hpp"
+#include <fmt/format.h>
+
#include <xyz/openbmc_project/Common/Device/error.hpp>
#include <chrono> // sleep_for()
@@ -27,7 +29,10 @@
{
// Relying on property change or interface added to retry.
// Log an informational trace to the journal.
- log<level::INFO>("D-Bus property access failure exception");
+ log<level::INFO>(
+ fmt::format("D-Bus property {} access failure exception",
+ inventoryPath)
+ .c_str());
}
}