Add host info in log message
Added host info like "Host0" in log message when power state change.
This change is to keep future implementation of multi host support
and currently it only support Host0 so this hard code.
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Change-Id: I2d9edc1bf098de954a0ea62dcdfc0858693a1a7a
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index ad603f7..b891c8c 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -188,10 +188,12 @@
}
static void logStateTransition(const PowerState state)
{
- std::string logMsg = "Moving to \"" + getPowerStateName(state) + "\" state";
+ std::string logMsg =
+ "Host0: Moving to \"" + getPowerStateName(state) + "\" state";
phosphor::logging::log<phosphor::logging::level::INFO>(
logMsg.c_str(),
- phosphor::logging::entry("STATE=%s", getPowerStateName(state).c_str()));
+ phosphor::logging::entry("STATE=%s", getPowerStateName(state).c_str()),
+ phosphor::logging::entry("HOST=0"));
}
enum class Event