pldmd, requester, softoff & utilities: Improving logs (lg2)
This commit corrects the severity level of logs and also formats the
message string, fixing the ill-defined message string of the logs as
mentioned in the anti-pattern document [1]. Additionally, based on the
requirement this commit adds more debug information to logs.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#ill-defined-data-structuring-in-lg2-message-strings
Change-Id: I230e9e1404db8c92c81e2f872183d691c91ff16c
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
diff --git a/softoff/main.cpp b/softoff/main.cpp
index cfbbcd2..ae81814 100644
--- a/softoff/main.cpp
+++ b/softoff/main.cpp
@@ -25,14 +25,14 @@
if (softPower.isError())
{
error(
- "Host failed to gracefully shutdown, exiting pldm-softpoweroff app");
+ "Failure in gracefully shutdown by remote terminus, exiting pldm-softpoweroff app");
return -1;
}
if (softPower.isCompleted())
{
error(
- "Host current state is not Running, exiting pldm-softpoweroff app");
+ "Remote terminus current state is not Running, exiting pldm-softpoweroff app");
return 0;
}
@@ -41,7 +41,7 @@
if (softPower.hostSoftOff(event))
{
error(
- "pldm-softpoweroff:Failure in sending soft off request to the host. Exiting pldm-softpoweroff app");
+ "Failure in sending soft off request to the remote terminus. Exiting pldm-softpoweroff app");
return -1;
}
@@ -50,7 +50,7 @@
pldm::utils::reportError(
"pldm soft off: Waiting for the host soft off timeout");
error(
- "PLDM host soft off: ERROR! Wait for the host soft off timeout. Exit the pldm-softpoweroff");
+ "ERROR! Waiting for the host soft off timeout. Exit the pldm-softpoweroff");
return -1;
}