libpldmresponder: 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: I7dc5c308a8cd76573995e07d01d1a6037bca31ba
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
diff --git a/libpldmresponder/pdr_numeric_effecter.hpp b/libpldmresponder/pdr_numeric_effecter.hpp
index b213912..a425da3 100644
--- a/libpldmresponder/pdr_numeric_effecter.hpp
+++ b/libpldmresponder/pdr_numeric_effecter.hpp
@@ -217,9 +217,9 @@
catch (const std::exception& e)
{
error(
- "D-Bus object path does not exist, effecter ID: {EFFECTER_ID}",
- "EFFECTER_ID", static_cast<uint16_t>(pdr->effecter_id));
- continue;
+ "D-Bus object path does not exist for effecter ID '{EFFECTER_ID}', error - {ERROR}",
+ "EFFECTER_ID", static_cast<uint16_t>(pdr->effecter_id), "ERROR",
+ e);
}
dbusMappings.emplace_back(std::move(dbusMapping));
pdr->effecter_id = handler.getNextEffecterId();